• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IDefinitionIdentity类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: CreateFromName

 private void CreateFromName(ApplicationIdentity applicationIdentity)
 {
     if (applicationIdentity == null)
     {
         throw new ArgumentNullException("applicationIdentity");
     }
     this._applicationIdentity = applicationIdentity;
     IEnumDefinitionIdentity identity = this._applicationIdentity.Identity.EnumAppPath();
     this._definitionIdentities = new ArrayList(2);
     IDefinitionIdentity[] definitionIdentity = new IDefinitionIdentity[1];
     while (identity.Next(1, definitionIdentity) == 1)
     {
         this._definitionIdentities.Add(definitionIdentity[0]);
     }
     this._definitionIdentities.TrimToSize();
     if (this._definitionIdentities.Count <= 1)
     {
         throw new ArgumentException(Environment.GetResourceString("Argument_InvalidAppId"));
     }
     this._manifestPaths = null;
     this._manifests = null;
     this._actContext = IsolationInterop.CreateActContext(this._applicationIdentity.Identity);
     this._form = ContextForm.StoreBounded;
     this._appRunState = ApplicationStateDisposition.Undefined;
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:25,代码来源:ActivationContext.cs


示例2: StoreOperationStageComponent

 public StoreOperationStageComponent(IDefinitionAppId app, IDefinitionIdentity comp, string Manifest)
 {
     this.Size = (uint) Marshal.SizeOf(typeof(StoreOperationStageComponent));
     this.Flags = OpFlags.Nothing;
     this.Application = app;
     this.Component = comp;
     this.ManifestPath = Manifest;
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:8,代码来源:StoreOperationStageComponent.cs


示例3: StoreOperationStageComponentFile

 public StoreOperationStageComponentFile(IDefinitionAppId App, IDefinitionIdentity Component, string CompRelPath, string SrcFile)
 {
     this.Size = (uint) Marshal.SizeOf(typeof(StoreOperationStageComponentFile));
     this.Flags = OpFlags.Nothing;
     this.Application = App;
     this.Component = Component;
     this.ComponentRelativePath = CompRelPath;
     this.SourceFilePath = SrcFile;
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:9,代码来源:StoreOperationStageComponentFile.cs


示例4: GetAssemblyIdentity

 public IDefinitionIdentity GetAssemblyIdentity(
     UInt32 Flags,
     IDefinitionIdentity DefinitionIdentity
     )
 {
     object o;
     System.Guid g = IsolationInterop.IID_IDefinitionIdentity;
     o=_pStore.GetAssemblyInformation(
         Flags,
         DefinitionIdentity,
         ref g);
     return (IDefinitionIdentity)o;
 }
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:13,代码来源:isolationinterop.cs


示例5: CommitApplicationTrust

        private void CommitApplicationTrust(ApplicationIdentity applicationIdentity, string trustXml) { 
            StoreOperationMetadataProperty[] properties = new StoreOperationMetadataProperty[] {
                    new StoreOperationMetadataProperty(ClrPropertySet, ApplicationTrustProperty, trustXml) 
                }; 

            IEnumDefinitionIdentity idenum = applicationIdentity.Identity.EnumAppPath(); 
            IDefinitionIdentity[] asbId = new IDefinitionIdentity[1];
            IDefinitionIdentity deplId = null;
            if (idenum.Next(1, asbId) == 1)
                deplId = asbId[0]; 

            IDefinitionAppId defAppId = IsolationInterop.AppIdAuthority.CreateDefinition(); 
            defAppId.SetAppPath(1, new IDefinitionIdentity[] {deplId}); 
            defAppId.put_Codebase(applicationIdentity.CodeBase);
 
            using (StoreTransaction storeTxn = new StoreTransaction()) {
                storeTxn.Add(new StoreOperationSetDeploymentMetadata(defAppId, InstallReference, properties));
                RefreshStorePointer();
                m_pStore.Transact(storeTxn.Operations); 
            }
 
            m_appTrusts = null; // reset the app trusts in the collection. 
        }
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:23,代码来源:ApplicationTrust.cs


示例6: GetComponentManifest

 internal ICMS GetComponentManifest(IDefinitionIdentity component)
 { 
     object o;
     _actContext.GetComponentManifest(0, component, ref IsolationInterop.IID_ICMS, out o);
     return o as ICMS;
 } 
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:6,代码来源:activationcontext.cs


示例7: EnumSubcategories

 public StoreSubcategoryEnumeration EnumSubcategories(EnumSubcategoriesFlags Flags, IDefinitionIdentity CategoryMatch)
 {
     return this.EnumSubcategories(Flags, CategoryMatch, null);
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:4,代码来源:Store.cs


示例8: EnumInstallationReferences

 public IEnumSTORE_ASSEMBLY_INSTALLATION_REFERENCE EnumInstallationReferences(EnumAssemblyInstallReferenceFlags Flags, IDefinitionIdentity Assembly)
 {
     Guid guidOfType = IsolationInterop.GetGuidOfType(typeof(IEnumSTORE_ASSEMBLY_INSTALLATION_REFERENCE));
     return (IEnumSTORE_ASSEMBLY_INSTALLATION_REFERENCE) this._pStore.EnumInstallationReferences((uint) Flags, Assembly, ref guidOfType);
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:5,代码来源:Store.cs


示例9: DefinitionIdentity

        internal DefinitionIdentity(IDefinitionIdentity i)
        {
            if (i == null)
                throw new ArgumentNullException();

            _id = i;
        }
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:7,代码来源:isolationinterop.cs


示例10: EnumCategoryInstances

 public StoreCategoryInstanceEnumeration EnumCategoryInstances(EnumCategoryInstancesFlags Flags, IDefinitionIdentity Category, string SubCat)
 {
     System.Guid g = IsolationInterop.GetGuidOfType(typeof(IEnumSTORE_CATEGORY_INSTANCE));
     object o;
     o=_pStore.EnumCategoryInstances((UInt32)Flags, Category, SubCat, ref g);
     return new StoreCategoryInstanceEnumeration((IEnumSTORE_CATEGORY_INSTANCE)o);
 }
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:7,代码来源:isolationinterop.cs


示例11: EnumSubcategories

 public StoreSubcategoryEnumeration  EnumSubcategories(EnumSubcategoriesFlags Flags, IDefinitionIdentity Category, string SearchPattern)
 {
     System.Guid g = IsolationInterop.GetGuidOfType(typeof(IEnumSTORE_CATEGORY_SUBCATEGORY));
     object o;
     o=_pStore.EnumSubcategories((UInt32)Flags, Category, SearchPattern, ref g);
     return new StoreSubcategoryEnumeration((IEnumSTORE_CATEGORY_SUBCATEGORY)o);
 }
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:7,代码来源:isolationinterop.cs


示例12: QueryChangeID

 public UInt64 QueryChangeID(IDefinitionIdentity asm)
 {
     UInt64 ChangeId;
     ChangeId=_pStore.QueryChangeID(asm);
     return ChangeId;
 }
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:6,代码来源:isolationinterop.cs


示例13: LockAssemblyPath

 public IPathLock LockAssemblyPath(IDefinitionIdentity asm)
 {
     string thePath;
     IntPtr theCookie;
     thePath=_pStore.LockAssemblyPath(0, asm, out theCookie);
     return new AssemblyPathLock(_pStore, theCookie, thePath);
 }
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:7,代码来源:isolationinterop.cs


示例14: EnumInstallationReferences

 public IEnumSTORE_ASSEMBLY_INSTALLATION_REFERENCE EnumInstallationReferences(
         EnumAssemblyInstallReferenceFlags Flags,
         IDefinitionIdentity Assembly
         )
 {
     System.Guid g = IsolationInterop.GetGuidOfType(typeof(IEnumSTORE_ASSEMBLY_INSTALLATION_REFERENCE));
     object o;
     o=_pStore.EnumInstallationReferences((UInt32)Flags, Assembly, ref g);
     return (IEnumSTORE_ASSEMBLY_INSTALLATION_REFERENCE)o;
 }
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:10,代码来源:isolationinterop.cs


示例15: EnumPrivateFiles

 public StoreAssemblyFileEnumeration EnumPrivateFiles(
         EnumApplicationPrivateFiles Flags,
         IDefinitionAppId Application,
         IDefinitionIdentity Assembly)
 {
     System.Guid g = IsolationInterop.GetGuidOfType(typeof(IEnumSTORE_ASSEMBLY_FILE));
     object o;
     o=_pStore.EnumPrivateFiles((UInt32)Flags, Application, Assembly, ref g);
     return new StoreAssemblyFileEnumeration((IEnumSTORE_ASSEMBLY_FILE)o);
 }
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:10,代码来源:isolationinterop.cs


示例16: BindReferenceToAssemblyManifest

 public ICMS BindReferenceToAssemblyManifest(uint Flags, IReferenceIdentity ReferenceIdentity, uint cDeploymentsToIgnore, IDefinitionIdentity[] DefinitionIdentity_DeploymentsToIgnore)
 {
     Guid riid = IsolationInterop.IID_ICMS;
     return (ICMS) this._pStore.BindReferenceToAssembly(Flags, ReferenceIdentity, cDeploymentsToIgnore, DefinitionIdentity_DeploymentsToIgnore, ref riid);
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:5,代码来源:Store.cs


示例17: EnumCategoryInstances

 public StoreCategoryInstanceEnumeration EnumCategoryInstances(EnumCategoryInstancesFlags Flags, IDefinitionIdentity Category, string SubCat)
 {
     Guid guidOfType = IsolationInterop.GetGuidOfType(typeof(IEnumSTORE_CATEGORY_INSTANCE));
     return new StoreCategoryInstanceEnumeration((IEnumSTORE_CATEGORY_INSTANCE) this._pStore.EnumCategoryInstances((uint) Flags, Category, SubCat, ref guidOfType));
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:5,代码来源:Store.cs


示例18: EnumPrivateFiles

 public StoreAssemblyFileEnumeration EnumPrivateFiles(EnumApplicationPrivateFiles Flags, IDefinitionAppId Application, IDefinitionIdentity Assembly)
 {
     Guid guidOfType = IsolationInterop.GetGuidOfType(typeof(IEnumSTORE_ASSEMBLY_FILE));
     return new StoreAssemblyFileEnumeration((IEnumSTORE_ASSEMBLY_FILE) this._pStore.EnumPrivateFiles((uint) Flags, Application, Assembly, ref guidOfType));
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:5,代码来源:Store.cs


示例19: SetAppPath

 void SetAppPath(IDefinitionIdentity[] Ids)
 {
     _id.SetAppPath((uint)Ids.Length, Ids);
 }
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:4,代码来源:isolationinterop.cs


示例20: CreateFromNameAndManifests

        private void CreateFromNameAndManifests (ApplicationIdentity applicationIdentity, string[] manifestPaths)
        {
            if (applicationIdentity == null) 
                throw new ArgumentNullException("applicationIdentity");
            if (manifestPaths == null) 
                throw new ArgumentNullException("manifestPaths"); 
            Contract.EndContractBlock();
 
            _applicationIdentity = applicationIdentity;

            // ISSUE - need validation on manifestPaths
 
            IEnumDefinitionIdentity idenum = _applicationIdentity.Identity.EnumAppPath();
 
            _manifests = new ArrayList(DefaultComponentCount); 
            _manifestPaths = new String[manifestPaths.Length];
 
            IDefinitionIdentity[] asbId = new IDefinitionIdentity[1];
            int i=0;
            while (idenum.Next(1, asbId) == 1)
            { 
                ICMS cms = (ICMS) IsolationInterop.ParseManifest(manifestPaths[i], null, ref IsolationInterop.IID_ICMS);
 
                if (IsolationInterop.IdentityAuthority.AreDefinitionsEqual(0, cms.Identity, asbId[0])) 
                {
                    _manifests.Add(cms); 
                    _manifestPaths[i]=manifestPaths[i];
                }
                else
                { 
#if ISOLATION_IN_MSCORLIB
                    throw new ArgumentException(Environment.GetResourceString("Argument_IllegalAppIdMismatch")); 
#else 
                    throw new ArgumentException("Application Identity does not match identity in manifests");
#endif 
                }
                i++;
            }
            if (i!=manifestPaths.Length) 
            {
#if ISOLATION_IN_MSCORLIB 
                throw new ArgumentException(Environment.GetResourceString("Argument_IllegalAppId")); 
#else
                throw new ArgumentException("Application Identity does not have same number of components as manifest paths"); 
#endif
            }
            _manifests.TrimToSize();
            if (_manifests.Count <= 1) 
            {
#if ISOLATION_IN_MSCORLIB 
                throw new ArgumentException(Environment.GetResourceString("Argument_InvalidAppId")); 
#else
                throw new ArgumentException("Invalid identity: no deployment/app identity specified"); 
#endif
            }

            _definitionIdentities = null; 
            _actContext = null;
            _form = ContextForm.Loose; 
            _appRunState = ApplicationStateDisposition.Undefined; 

#if ISOLATION_IN_MSCORLIB 
            Contract.Assert(_manifests.Count == 2, "An application must have exactly 1 deployment component and 1 application component in Whidbey");
#endif
        }
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:65,代码来源:activationcontext.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IDefinitionManager类代码示例发布时间:2022-05-24
下一篇:
C# IDefinitionAppId类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap