Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Package"/> class.
 /// </summary>
 public Package()
 {
     localDependencies = new List<PackageReference>();
     temporaryAssets = new AssetItemCollection();
     assets = new PackageAssetCollection(this);
     explicitFolders = new List<UDirectory>();
     Bundles = new BundleCollection(this);
     Meta = new PackageMeta();
     TemplateFolders = new List<TemplateFolder>();
     Templates = new List<TemplateDescription>();
     Profiles = new PackageProfileCollection();
     IsDirty = true;
 }
Пример #2
0
 internal static PackageMeta FromNuGet(NuGet.IPackageMetadata metadata)
 {
     var packageMeta = new PackageMeta();
     packageMeta.InitializeFrom(metadata);
     return packageMeta;
 }
Пример #3
0
        /// <summary>
        /// Creates a new <see cref="PackageMeta" /> with default values.
        /// </summary>
        /// <param name="packageName">Name of the package.</param>
        /// <returns>PackageMeta.</returns>
        /// <exception cref="System.ArgumentNullException">packageName</exception>
        public static PackageMeta NewDefault(string packageName)
        {
            if (string.IsNullOrWhiteSpace(packageName)) throw new ArgumentNullException("packageName");

            var meta = new PackageMeta()
                {
                    Name = packageName,
                    Version = new PackageVersion("1.0.0"),
                    Description = "Modify description of this package here",
                };
            meta.Authors.Add("Modify Author of this package here");

            return meta;
        }
Пример #4
0
 /// <summary>
 /// Copies local and store depdencies of this instance to the specified package
 /// </summary>
 /// <param name="packageMeta">The package meta.</param>
 /// <exception cref="System.ArgumentNullException">packageMeta</exception>
 public void CopyDependenciesTo(PackageMeta packageMeta)
 {
     if (packageMeta == null) throw new ArgumentNullException("packageMeta");
     foreach (var packageDependency in Dependencies)
     {
         if (!packageMeta.Dependencies.Contains(packageDependency))
         {
             packageMeta.Dependencies.Add(packageDependency.Clone());
         }
     }
 }
Пример #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Package"/> class.
 /// </summary>
 public Package()
 {
     localDependencies = new List<PackageReference>();
     temporaryAssets = new AssetItemCollection();
     assets = new PackageAssetCollection(this);
     explicitFolders = new List<UDirectory>();
     loadedAssemblies = new List<PackageLoadedAssembly>();
     Bundles = new BundleCollection(this);
     Meta = new PackageMeta();
     TemplateFolders = new List<TemplateFolder>();
     Templates = new List<TemplateDescription>();
     Profiles = new PackageProfileCollection();
     IsDirty = true;
     settings = new Lazy<PackageUserSettings>(() => new PackageUserSettings(this));
     SerializedVersion = PackageFileVersion;
 }
Пример #6
0
 public static PackageMeta FromNuGet(NuGet.IPackageMetadata metadata)
 {
     var packageMeta = new PackageMeta();
     packageMeta.InitializeFrom(metadata);
     return packageMeta;
 }