Ejemplo n.º 1
0
        private void ImportAttributes()
        {
            IReferenceIdentity refid = (IReferenceIdentity)NativeMethods.GetAssemblyIdentityFromFile(_path, ref s_refidGuid);

            string name           = refid.GetAttribute(null, "name");
            string version        = refid.GetAttribute(null, "version");
            string publicKeyToken = refid.GetAttribute(null, "publicKeyToken");

            if (String.Equals(publicKeyToken, "neutral", StringComparison.OrdinalIgnoreCase))
            {
                publicKeyToken = String.Empty;
            }
            else if (!String.IsNullOrEmpty(publicKeyToken))
            {
                publicKeyToken = publicKeyToken.ToUpperInvariant();
            }
            string culture = refid.GetAttribute(null, "culture");
            string processorArchitecture = refid.GetAttribute(null, "processorArchitecture");

            if (!String.IsNullOrEmpty(processorArchitecture))
            {
                processorArchitecture = processorArchitecture.ToLowerInvariant();
            }

            _attributes = new StringDictionary
            {
                { "Name", name },
                { "Version", version },
                { "PublicKeyToken", publicKeyToken },
                { "Culture", culture },
                { "ProcessorArchitecture", processorArchitecture }
            };
        }
Ejemplo n.º 2
0
        public ICMS BindReferenceToAssemblyManifest(uint Flags, IReferenceIdentity ReferenceIdentity, uint cDeploymentsToIgnore, IDefinitionIdentity[] DefinitionIdentity_DeploymentsToIgnore)
        {
            Guid   iid_ICMS = IsolationInterop.IID_ICMS;
            object obj      = this._pStore.BindReferenceToAssembly(Flags, ReferenceIdentity, cDeploymentsToIgnore, DefinitionIdentity_DeploymentsToIgnore, ref iid_ICMS);

            return((ICMS)obj);
        }
        private void ImportAttributes()
        {
            IReferenceIdentity assemblyIdentityFromFile = (IReferenceIdentity)Microsoft.Build.Tasks.Deployment.ManifestUtilities.NativeMethods.GetAssemblyIdentityFromFile(this._path, ref _refidGuid);
            string             attribute = assemblyIdentityFromFile.GetAttribute(null, "name");
            string             str2      = assemblyIdentityFromFile.GetAttribute(null, "version");
            string             a         = assemblyIdentityFromFile.GetAttribute(null, "publicKeyToken");

            if (string.Equals(a, "neutral", StringComparison.OrdinalIgnoreCase))
            {
                a = string.Empty;
            }
            else if (!string.IsNullOrEmpty(a))
            {
                a = a.ToUpperInvariant();
            }
            string str4 = assemblyIdentityFromFile.GetAttribute(null, "culture");
            string str5 = assemblyIdentityFromFile.GetAttribute(null, "processorArchitecture");

            if (!string.IsNullOrEmpty(str5))
            {
                str5 = str5.ToLowerInvariant();
            }
            this._attributes = new StringDictionary();
            this._attributes.Add("Name", attribute);
            this._attributes.Add("Version", str2);
            this._attributes.Add("PublicKeyToken", a);
            this._attributes.Add("Culture", str4);
            this._attributes.Add("ProcessorArchitecture", str5);
            assemblyIdentityFromFile = null;
        }
Ejemplo n.º 4
0
 internal ReferenceIdentity(IReferenceIdentity i)
 {
     if (i == null)
     {
         throw new ArgumentNullException();
     }
     this._id = i;
 }
Ejemplo n.º 5
0
 public bool MoveNext()
 {
     if ((int)this._enum.Next(1U, this._fetchList) == 1)
     {
         this._current = this._fetchList[0];
         return(true);
     }
     this._current = (IReferenceIdentity)null;
     return(false);
 }
Ejemplo n.º 6
0
 public StoreAssemblyEnumeration EnumAssemblies(EnumAssembliesFlags Flags, IReferenceIdentity refToMatch)
 {
     Guid guidOfType = IsolationInterop.GetGuidOfType(typeof(IEnumSTORE_ASSEMBLY));
     return new StoreAssemblyEnumeration((IEnumSTORE_ASSEMBLY) this._pStore.EnumAssemblies((uint) Flags, refToMatch, ref guidOfType));
 }
Ejemplo n.º 7
0
 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);
 }
 public void Reset()
 {
     _current = null;
     _enum.Reset();
 }
 public bool MoveNext()
 {
     if ((_enum.Next(1, _fetchList)) == 1)
     {
         _current = _fetchList[0];
         return true;
     }
     else
     {
         _current = null;
         return false;
     }
 }
        internal ReferenceIdentity(IReferenceIdentity i)
        {
            if (i == null)
                throw new ArgumentNullException();

            _id = i;
        }
Ejemplo n.º 11
0
 public ReferenceIdentity(string text)
 {
     this._idComPtr = IsolationInterop.IdentityAuthority.TextToReference(0U, text);
 }
Ejemplo n.º 12
0
        public StoreCategoryEnumeration EnumCategories(Store.EnumCategoriesFlags Flags, IReferenceIdentity CategoryMatch)
        {
            Guid   guidOfType = IsolationInterop.GetGuidOfType(typeof(IEnumSTORE_CATEGORY));
            object obj        = this._pStore.EnumCategories((uint)Flags, CategoryMatch, ref guidOfType);

            return(new StoreCategoryEnumeration((IEnumSTORE_CATEGORY)obj));
        }
Ejemplo n.º 13
0
        public IDefinitionIdentity BindReferenceToAssemblyIdentity(uint Flags, IReferenceIdentity ReferenceIdentity, uint cDeploymentsToIgnore, IDefinitionIdentity[] DefinitionIdentity_DeploymentsToIgnore)
        {
            Guid riid = IsolationInterop.IID_IDefinitionIdentity;

            return((IDefinitionIdentity)this._pStore.BindReferenceToAssembly(Flags, ReferenceIdentity, cDeploymentsToIgnore, DefinitionIdentity_DeploymentsToIgnore, ref riid));
        }
Ejemplo n.º 14
0
 public StoreCategoryEnumeration EnumCategories(EnumCategoriesFlags Flags, IReferenceIdentity CategoryMatch)
 {
     Guid guidOfType = IsolationInterop.GetGuidOfType(typeof(IEnumSTORE_CATEGORY));
     return new StoreCategoryEnumeration((IEnumSTORE_CATEGORY) this._pStore.EnumCategories((uint) Flags, CategoryMatch, ref guidOfType));
 }
Ejemplo n.º 15
0
 internal static extern uint GetAssemblyIdentityFromFile(System.String wszAssemblyPath, ref Guid riid, out IReferenceIdentity i);
Ejemplo n.º 16
0
 public void Reset()
 {
     this._current = (IReferenceIdentity)null;
     this._enum.Reset();
 }
Ejemplo n.º 17
0
 public ReferenceIdentity(IReferenceIdentity idComPtr)
 {
     this._idComPtr = idComPtr;
 }
Ejemplo n.º 18
0
 internal static extern uint GetAssemblyIdentityFromFile(System.String wszAssemblyPath, ref Guid riid, out IReferenceIdentity i);
 public CMS.ICMS BindReferenceToAssemblyManifest(
     UInt32 Flags,
     IReferenceIdentity ReferenceIdentity,
     uint cDeploymentsToIgnore,
     IDefinitionIdentity[] DefinitionIdentity_DeploymentsToIgnore
     )
 {
     object o;
     System.Guid g = IsolationInterop.IID_ICMS;
     o=_pStore.BindReferenceToAssembly(
         Flags,
         ReferenceIdentity,
         cDeploymentsToIgnore,
         DefinitionIdentity_DeploymentsToIgnore,
         ref g);
     return (CMS.ICMS)o;
 }
Ejemplo n.º 20
0
        public StoreAssemblyEnumeration EnumAssemblies(Store.EnumAssembliesFlags Flags, IReferenceIdentity refToMatch)
        {
            Guid   guidOfType = IsolationInterop.GetGuidOfType(typeof(IEnumSTORE_ASSEMBLY));
            object obj        = this._pStore.EnumAssemblies((uint)Flags, refToMatch, ref guidOfType);

            return(new StoreAssemblyEnumeration((IEnumSTORE_ASSEMBLY)obj));
        }
        public StoreAssemblyEnumeration EnumAssemblies(EnumAssembliesFlags Flags, IReferenceIdentity refToMatch)
        {
            System.Guid g = IsolationInterop.GetGuidOfType(typeof(IEnumSTORE_ASSEMBLY));
            object o;

            o=_pStore.EnumAssemblies((UInt32)Flags, refToMatch, ref g);
            return new StoreAssemblyEnumeration((IEnumSTORE_ASSEMBLY)o);
        }
 public StoreCategoryEnumeration EnumCategories(EnumCategoriesFlags Flags, IReferenceIdentity CategoryMatch)
 {
     System.Guid g = IsolationInterop.GetGuidOfType(typeof(IEnumSTORE_CATEGORY));
     object o;
     o=_pStore.EnumCategories((UInt32)Flags, CategoryMatch, ref g);
     return new StoreCategoryEnumeration((IEnumSTORE_CATEGORY)o);
 }
Ejemplo n.º 23
0
 public ReferenceIdentity()
 {
     this._idComPtr = IsolationInterop.IdentityAuthority.CreateReference();
 }