当前位置: 首页>>代码示例>>C#>>正文


C# IPackageInfo类代码示例

本文整理汇总了C#中IPackageInfo的典型用法代码示例。如果您正苦于以下问题:C# IPackageInfo类的具体用法?C# IPackageInfo怎么用?C# IPackageInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IPackageInfo类属于命名空间,在下文中一共展示了IPackageInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DeployDependency

 public void DeployDependency(IPackageInfo resolvedPackage,
     IPackagePublisher publisher)
 {
     var source = resolvedPackage.Load();
     using (var packageStream = source.OpenStream())
         publisher.Publish(resolvedPackage.FullName + ".wrap", packageStream);
 }
开发者ID:andrewdavey,项目名称:openwrap,代码行数:7,代码来源:DefaultPackageDeployer.cs

示例2: ReadPackage

        public void ReadPackage(IPackageInfo package, IPackageLog log)
        {
            _currentPackage = package;

            //double dispatch - hard to follow - at the moment
            package.LoadAssemblies(this);
        }
开发者ID:NTCoding,项目名称:FubuRaven.NTCoding.com,代码行数:7,代码来源:AssemblyLoader.cs

示例3: LogAssembly

 // TODO:  Try to find the assembly file version here.
 public void LogAssembly(IPackageInfo package, Assembly assembly, string provenance)
 {
     LogObject(assembly, provenance);
     var packageLog = LogFor(package);
     packageLog.Trace("Loaded assembly " + assembly.GetName().FullName);
     packageLog.AddChild(assembly);
 }
开发者ID:sbartlett,项目名称:fubumvc,代码行数:8,代码来源:PackagingDiagnostics.cs

示例4: AddPackage

 public void AddPackage(IPackageInfo package)
 {
     PackageButton button = new PackageButton("button" + buttons.Count, package);
     button.Click += new EventHandler<MouseButtonEventArgs>(button_Click);
     buttons.Add(button);
     vScroll.Maximum = System.Math.Max(1, buttons.Count - maxVisibleButtons);
     base.AddWidget(button);
     VerifyButtons();
 }
开发者ID:blastboy,项目名称:Client,代码行数:9,代码来源:PackageScroller.cs

示例5: PackageInstaller

 public PackageInstaller(string packagePath, string packageDataDirectory, string basePath, IPackageInfo package, IPackageLoader loader)
 {
     this.packagePath = packagePath;
     this.packageDataDirectory = packageDataDirectory;
     this.basePath = basePath;
     this.package = package;
     this.loader = loader;
     packageZip = new ZipFile(packagePath);
 }
开发者ID:ChaotixBluix,项目名称:Updater,代码行数:9,代码来源:PackageInstaller.cs

示例6: VisitDependencyNode

 bool VisitDependencyNode(IPackageInfo from, PackageDependency dependency, IPackageInfo to, PackageVisitor visitor, Dictionary<string,int> visitsLeft)
 {
     if (!visitor(from, dependency, to)) return false;
     if (DecreaseVisitCount(visitsLeft, to.Name) <= 0)
     {
         foreach (var dependencyNode in to.Dependencies)
             if (!VisitDependencyNode(to, dependencyNode, _byName[dependencyNode.Name], visitor, visitsLeft))
                 return false;
     }
     return true;
 }
开发者ID:carcer,项目名称:openwrap,代码行数:11,代码来源:PackageGraphVisitor.cs

示例7: InMemoryPackage

 public InMemoryPackage(IPackageInfo packageToCopy)
     : this()
 {
     Created = packageToCopy.Created;
     Dependencies = packageToCopy.Dependencies.ToList();
     Anchored = packageToCopy.Anchored;
     Description = packageToCopy.Description;
     Name = packageToCopy.Name;
     Nuked = packageToCopy.Nuked;
     Source = packageToCopy.Source;
     Title = packageToCopy.Title;
     Version = packageToCopy.Version;
 }
开发者ID:QMTech,项目名称:openwrap,代码行数:13,代码来源:InMemoryPackage.cs

示例8: ResolveAllDependencies

        IEnumerable<ResolvedDependency> ResolveAllDependencies(IPackageInfo parent, IEnumerable<WrapDependency> dependencies, IDictionary<string,string> dependencyOverrides, IEnumerable<IPackageRepository> repositories)
        {
            var packages = from dependency in dependencies
                           let package = repositories
                                .Where(x=> x != null)
                                .Select(x => x.Find(dependency))
                                .FirstOrDefault(x=>x != null)
                           select new ResolvedDependency { Dependency = dependency, Package = package, ParentPackage = parent };
            foreach (var package in packages.Where(p=>p.Package != null))
                packages = packages.Concat(ResolveAllDependencies(package.Package, package.Package.Dependencies, dependencyOverrides, repositories));

            return packages.ToList();
        }
开发者ID:x97mdr,项目名称:openwrap,代码行数:13,代码来源:PackageManager.cs

示例9: PackageButton

        public PackageButton(string name, IPackageInfo attachedPackage)
            : base(name)
        {
            this.attachedPackage = attachedPackage;
            this.Size = new Size(200, 50);
            base.Font = Graphics.FontManager.LoadFont("tahoma", 12);
            base.BackColor = Color.SteelBlue;
            base.HighlightType = SdlDotNet.Widgets.HighlightType.Color;
            base.HighlightColor = Color.LightSteelBlue;

            installedSurf = Graphics.SurfaceManager.LoadSurface(IO.Paths.GfxPath + "Updater\\package-installed.png");

            base.Text = attachedPackage.FullID;

            base.Paint += new EventHandler(PackageButton_Paint);
        }
开发者ID:blastboy,项目名称:Client,代码行数:16,代码来源:PackageButton.cs

示例10: LogAssembly

        public void LogAssembly(IPackageInfo package, Assembly assembly, string provenance)
        {
            try
            {
                var assVer = getVersion(assembly);

                LogObject(assembly, provenance);
                var packageLog = LogFor(package);
                packageLog.Trace("Loaded assembly '{0}' v{1}".ToFormat(assembly.GetName().FullName,assVer.FileVersion));
                packageLog.AddChild(assembly);
            }
            catch (Exception ex)
            {
                throw new Exception("Trying to log assembly '{0}' in package '{1}' at {2}".ToFormat(assembly.FullName, package.Name, assembly.Location), ex);
            }
        }
开发者ID:jrios,项目名称:bottles,代码行数:16,代码来源:PackagingDiagnostics.cs

示例11: LoadPackage

        public void LoadPackage(byte[] assembly, IPackageInfo packageInfo)
        {
            if (packageAppDomain != null) {
                Unload();
            }
            this.assemblyPath = assemblyPath;
            string fileNamespace = packageInfo.FullID;
            string dir = Path.GetDirectoryName(assemblyPath);

            //AppDomainSetup setup = AppDomain.CurrentDomain.SetupInformation;
            //setup.ApplicationBase = Environment.CurrentDirectory;
            packageAppDomain = AppDomain.CreateDomain(fileNamespace, null);
            // TODO: Load all the of the dependancies into memory too!
            //this.packageAppDomain.Load()
            Assembly loadedAssembly = this.packageAppDomain.Load(assembly);
            this.package = this.packageAppDomain.CreateInstance(loadedAssembly.FullName, "UpdatePackage.UpdatePackage").Unwrap() as IUpdatePackage;
        }
开发者ID:RainsSoft,项目名称:Updater,代码行数:17,代码来源:PackageLoader.cs

示例12: ExplodeAssembly

        public void ExplodeAssembly(string applicationDirectory, Assembly assembly, IPackageInfo packageInfo)
        {
            var directory = BottleFiles.GetDirectoryForExplodedPackage(applicationDirectory, assembly.GetName().Name);

            var request = new ExplodeRequest{
                Directory = directory,
                GetVersion = () => assembly.GetName().Version.ToString(),
                LogSameVersion = () => ConsoleWriter.Write("Assembly {0} has already been 'exploded' onto disk".ToFormat(assembly.GetName().FullName)),
                ExplodeAction = () => explodeAssembly(assembly, directory)
            };

            explode(request);

            _fileSystem.ChildDirectoriesFor(directory).Each(child =>
            {
                var name = Path.GetFileName(child);

                packageInfo.Files.RegisterFolder(name, child.ToFullPath());
            });
        }
开发者ID:wbinford,项目名称:bottles,代码行数:20,代码来源:BottleExploder.cs

示例13: VisitNodes

 protected bool VisitNodes(IPackageInfo from, PackageDependency dependency, IPackageInfo to)
 {
     visited.Add(to);
     return true;
 }
开发者ID:modulexcite,项目名称:openwrap,代码行数:5,代码来源:package_graph_visitor.cs

示例14: LogPackage

 public void LogPackage(IPackageInfo package, IPackageLoader loader)
 {
     LogObject(package, "Loaded by " + loader);
     LogFor(loader).AddChild(package);
 }
开发者ID:jrios,项目名称:bottles,代码行数:5,代码来源:PackagingDiagnostics.cs

示例15: LogDuplicateAssembly

 // just in log to package
 public void LogDuplicateAssembly(IPackageInfo package, string assemblyName)
 {
     LogFor(package).Trace("Assembly '{0}' was ignored because it is already loaded".ToFormat(assemblyName));
 }
开发者ID:jrios,项目名称:bottles,代码行数:5,代码来源:PackagingDiagnostics.cs


注:本文中的IPackageInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。