Exemplo n.º 1
0
        // Update the contents of the property panel to reflect the contents
        // of ``ai''.
        public void Display(IAssemblyInfo ai)
        {
            Debug.Assert(ai.GetAssembly() != null,
                         "This infopanel doens't display error information.");
            AssemblyName an = ai.GetAssembly().GetName();

            _update_assembly_name(an);
            _update_ref_assemblies(ai);
            _update_modules(ai);
        }
Exemplo n.º 2
0
        // Generate the AssemblyIdentity information for an Assembly.
        private static XmlNode _assembly_identity(XmlDocument d, IAssemblyInfo ai)
        {
            AssemblyRef a = ai.GetAssembly();

            if (a == null)
            {
                return(_bad_assembly(d, ai));
            }

            XmlElement cb = d.CreateElement(Localization.ACF_ASSEMBLYIDENTITY);

            cb.Attributes.Append(_attribute(d, Localization.ACF_ATTR_NAME,
                                            a.GetName().Name));
            cb.Attributes.Append(_attribute(d, Localization.ACF_ATTR_PUBLIC_KEY_TOKEN,
                                            _public_key_token(a)));
            cb.Attributes.Append(_attribute(d, Localization.ACF_ATTR_CULTURE,
                                            a.GetName().CultureInfo.Name));
            cb.Attributes.Append(_attribute(d, Localization.ACF_ATTR_VERSION,
                                            a.GetName().Version.ToString()));
            cb.Attributes.Append(_attribute(d, Localization.ACF_ATTR_CODE_BASE,
                                            a.CodeBase));

            return(cb);
        }