/// <summary> /// Loads <see cref="AssemblyPortabilityPolicy"/> information from XML with app.config schema. /// </summary> /// <exception cref="System.Xml.XmlException">The stream doesn't contain a well formed XML.</exception> /// <exception cref="ArgumentNullException"><paramref name="input"/> is null.</exception> /// <remarks> /// Tries to find supportPortability elements in the given XML: /// <![CDATA[ /// <configuration> /// <runtime> /// <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> /// <supportPortability PKT="7cec85d7bea7798e" enable="false"/> /// <supportPortability PKT="31bf3856ad364e35" enable="false"/> /// </assemblyBinding> /// </runtime> /// </configuration> /// ]]> /// /// Keeps the stream open. /// </remarks> public static DesktopAssemblyIdentityComparer LoadFromXml(Stream input) { return(new DesktopAssemblyIdentityComparer(AssemblyPortabilityPolicy.LoadFromXml(input))); }
/// <param name="policy">Assembly portability policy, usually provided through an app.config file.</param> internal DesktopAssemblyIdentityComparer(AssemblyPortabilityPolicy policy) { this.policy = policy; }