public DependentOS(System.Deployment.Internal.Isolation.Manifest.DependentOSMetadataEntry dependentOSMetadataEntry) { this._majorVersion = dependentOSMetadataEntry.MajorVersion; this._minorVersion = dependentOSMetadataEntry.MinorVersion; this._buildNumber = dependentOSMetadataEntry.BuildNumber; this._servicePackMajor = dependentOSMetadataEntry.ServicePackMajor; this._servicePackMinor = dependentOSMetadataEntry.ServicePackMinor; this._supportUrl = AssemblyManifest.UriFromMetadataEntry(dependentOSMetadataEntry.SupportUrl, "Ex_DependentOSSupportUrlNotValid"); }
public Deployment(DeploymentMetadataEntry deploymentMetadataEntry) { this._disallowUrlActivation = (deploymentMetadataEntry.DeploymentFlags & 128U) > 0U; this._install = (deploymentMetadataEntry.DeploymentFlags & 32U) > 0U; this._trustURLParameters = (deploymentMetadataEntry.DeploymentFlags & 64U) > 0U; this._mapFileExtensions = (deploymentMetadataEntry.DeploymentFlags & 256U) > 0U; this._createDesktopShortcut = (deploymentMetadataEntry.DeploymentFlags & 512U) > 0U; this._update = new DeploymentUpdate(deploymentMetadataEntry); this._minimumRequiredVersion = deploymentMetadataEntry.MinimumRequiredVersion != null ? new Version(deploymentMetadataEntry.MinimumRequiredVersion) : (Version)null; this._codebaseUri = AssemblyManifest.UriFromMetadataEntry(deploymentMetadataEntry.DeploymentProviderCodebase, "Ex_DepProviderNotValid"); }
public Deployment(System.Deployment.Internal.Isolation.Manifest.DeploymentMetadataEntry deploymentMetadataEntry) { this._disallowUrlActivation = (deploymentMetadataEntry.DeploymentFlags & 0x80) != 0; this._install = (deploymentMetadataEntry.DeploymentFlags & 0x20) != 0; this._trustURLParameters = (deploymentMetadataEntry.DeploymentFlags & 0x40) != 0; this._mapFileExtensions = (deploymentMetadataEntry.DeploymentFlags & 0x100) != 0; this._createDesktopShortcut = (deploymentMetadataEntry.DeploymentFlags & 0x200) != 0; this._update = new System.Deployment.Application.Manifest.DeploymentUpdate(deploymentMetadataEntry); this._minimumRequiredVersion = (deploymentMetadataEntry.MinimumRequiredVersion != null) ? new Version(deploymentMetadataEntry.MinimumRequiredVersion) : null; this._codebaseUri = AssemblyManifest.UriFromMetadataEntry(deploymentMetadataEntry.DeploymentProviderCodebase, "Ex_DepProviderNotValid"); }
public DependentAssembly(System.Deployment.Internal.Isolation.Manifest.AssemblyReferenceEntry assemblyReferenceEntry) { this._hashCollection = new System.Deployment.Application.HashCollection(); System.Deployment.Internal.Isolation.Manifest.AssemblyReferenceDependentAssemblyEntry dependentAssembly = assemblyReferenceEntry.DependentAssembly; this._size = dependentAssembly.Size; this._codebase = dependentAssembly.Codebase; this._group = dependentAssembly.Group; bool flag = false; System.Deployment.Internal.Isolation.ISection hashElements = dependentAssembly.HashElements; uint celt = (hashElements != null) ? hashElements.Count : 0; if (celt > 0) { uint celtFetched = 0; System.Deployment.Internal.Isolation.Manifest.IHashElementEntry[] rgelt = new System.Deployment.Internal.Isolation.Manifest.IHashElementEntry[celt]; System.Deployment.Internal.Isolation.IEnumUnknown unknown = (System.Deployment.Internal.Isolation.IEnumUnknown)hashElements._NewEnum; Marshal.ThrowExceptionForHR(unknown.Next(celt, rgelt, ref celtFetched)); if (celtFetched != celt) { throw new InvalidDeploymentException(ExceptionTypes.Manifest, Resources.GetString("Ex_IsoEnumFetchNotEqualToCount")); } for (uint i = 0; i < celt; i++) { System.Deployment.Internal.Isolation.Manifest.HashElementEntry allData = rgelt[i].AllData; if (allData.DigestValueSize > 0) { byte[] destination = new byte[allData.DigestValueSize]; Marshal.Copy(allData.DigestValue, destination, 0, (int)allData.DigestValueSize); this._hashCollection.AddHash(destination, (System.Deployment.Internal.Isolation.Manifest.CMS_HASH_DIGESTMETHOD)allData.DigestMethod, (System.Deployment.Internal.Isolation.Manifest.CMS_HASH_TRANSFORM)allData.Transform); flag = true; } } } if (!flag && (dependentAssembly.HashValueSize > 0)) { byte[] buffer2 = new byte[dependentAssembly.HashValueSize]; Marshal.Copy(dependentAssembly.HashValue, buffer2, 0, (int)dependentAssembly.HashValueSize); this._hashCollection.AddHash(buffer2, (System.Deployment.Internal.Isolation.Manifest.CMS_HASH_DIGESTMETHOD)dependentAssembly.HashAlgorithm, System.Deployment.Internal.Isolation.Manifest.CMS_HASH_TRANSFORM.CMS_HASH_TRANSFORM_IDENTITY); } this._preRequisite = (dependentAssembly.Flags & 4) != 0; this._optional = (assemblyReferenceEntry.Flags & 1) != 0; this._visible = (dependentAssembly.Flags & 2) != 0; this._resourceFallbackCultureInternal = (dependentAssembly.Flags & 8) != 0; this._resourceFallbackCulture = dependentAssembly.ResourceFallbackCulture; this._description = dependentAssembly.Description; this._supportUrl = AssemblyManifest.UriFromMetadataEntry(dependentAssembly.SupportUrl, "Ex_DependencySupportUrlNotValid"); System.Deployment.Internal.Isolation.IReferenceIdentity referenceIdentity = assemblyReferenceEntry.ReferenceIdentity; this._identity = new System.Deployment.Application.ReferenceIdentity(referenceIdentity); this._codebaseFS = UriHelper.NormalizePathDirectorySeparators(this._codebase); }
public DependentAssembly(AssemblyReferenceEntry assemblyReferenceEntry) { AssemblyReferenceDependentAssemblyEntry dependentAssembly = assemblyReferenceEntry.DependentAssembly; this._size = dependentAssembly.Size; this._codebase = dependentAssembly.Codebase; this._group = dependentAssembly.Group; bool flag = false; ISection hashElements = dependentAssembly.HashElements; uint celt = hashElements != null ? hashElements.Count : 0U; if (celt > 0U) { uint celtFetched = 0; IHashElementEntry[] hashElementEntryArray = new IHashElementEntry[(int)celt]; Marshal.ThrowExceptionForHR(((System.Deployment.Internal.Isolation.IEnumUnknown)hashElements._NewEnum).Next(celt, (object[])hashElementEntryArray, ref celtFetched)); if ((int)celtFetched != (int)celt) { throw new InvalidDeploymentException(ExceptionTypes.Manifest, Resources.GetString("Ex_IsoEnumFetchNotEqualToCount")); } for (uint index = 0; index < celt; ++index) { HashElementEntry allData = hashElementEntryArray[(int)index].AllData; if (allData.DigestValueSize > 0U) { byte[] numArray = new byte[(int)allData.DigestValueSize]; Marshal.Copy(allData.DigestValue, numArray, 0, (int)allData.DigestValueSize); this._hashCollection.AddHash(numArray, (CMS_HASH_DIGESTMETHOD)allData.DigestMethod, (CMS_HASH_TRANSFORM)allData.Transform); flag = true; } } } if (!flag && dependentAssembly.HashValueSize > 0U) { byte[] numArray = new byte[(int)dependentAssembly.HashValueSize]; Marshal.Copy(dependentAssembly.HashValue, numArray, 0, (int)dependentAssembly.HashValueSize); this._hashCollection.AddHash(numArray, (CMS_HASH_DIGESTMETHOD)dependentAssembly.HashAlgorithm, CMS_HASH_TRANSFORM.CMS_HASH_TRANSFORM_IDENTITY); } this._preRequisite = (dependentAssembly.Flags & 4U) > 0U; this._optional = (assemblyReferenceEntry.Flags & 1U) > 0U; this._visible = (dependentAssembly.Flags & 2U) > 0U; this._resourceFallbackCultureInternal = (dependentAssembly.Flags & 8U) > 0U; this._resourceFallbackCulture = dependentAssembly.ResourceFallbackCulture; this._description = dependentAssembly.Description; this._supportUrl = AssemblyManifest.UriFromMetadataEntry(dependentAssembly.SupportUrl, "Ex_DependencySupportUrlNotValid"); this._identity = new System.Deployment.Application.ReferenceIdentity(assemblyReferenceEntry.ReferenceIdentity); this._codebaseFS = System.Deployment.Application.UriHelper.NormalizePathDirectorySeparators(this._codebase); }
public Description(System.Deployment.Internal.Isolation.Manifest.DescriptionMetadataEntry descriptionMetadataEntry) { this._publisher = descriptionMetadataEntry.Publisher; this._product = descriptionMetadataEntry.Product; this._suiteName = descriptionMetadataEntry.SuiteName; if (this._suiteName == null) { this._suiteName = ""; } this._supportUri = AssemblyManifest.UriFromMetadataEntry(descriptionMetadataEntry.SupportUrl, "Ex_DescriptionSupportUrlNotValid"); this._errorReportUri = AssemblyManifest.UriFromMetadataEntry(descriptionMetadataEntry.ErrorReportUrl, "Ex_DescriptionErrorReportUrlNotValid"); this._iconFile = descriptionMetadataEntry.IconFile; if (this._iconFile != null) { this._iconFileFS = UriHelper.NormalizePathDirectorySeparators(this._iconFile); } this._filteredPublisher = PathTwiddler.FilterString(this._publisher, ' ', false); this._filteredProduct = PathTwiddler.FilterString(this._product, ' ', false); this._filteredSuiteName = PathTwiddler.FilterString(this._suiteName, ' ', false); }
internal CompatibleFrameworks(System.Deployment.Internal.Isolation.Manifest.CompatibleFrameworksMetadataEntry compatibleFrameworksMetadataEntry, CompatibleFramework[] frameworks) { this._supportUrl = AssemblyManifest.UriFromMetadataEntry(compatibleFrameworksMetadataEntry.SupportUrl, "Ex_CompatibleFrameworksSupportUrlNotValid"); this._frameworks = frameworks; }
internal CompatibleFrameworks(CompatibleFrameworksMetadataEntry compatibleFrameworksMetadataEntry, CompatibleFramework[] frameworks) { this._supportUrl = AssemblyManifest.UriFromMetadataEntry(compatibleFrameworksMetadataEntry.SupportUrl, "Ex_CompatibleFrameworksSupportUrlNotValid"); this._frameworks = frameworks; }