[Serializable]
[ClassInterfaceAttribute (ClassInterfaceType.None)]
[StructLayout (LayoutKind.Sequential)]
+#if MOBILE
+ public sealed class AssemblyName : ICloneable, ISerializable, IDeserializationCallback {
+#else
public sealed class AssemblyName : ICloneable, ISerializable, IDeserializationCallback, _AssemblyName {
-
+#endif
#pragma warning disable 169
#region Synch with object-internals.h
string name;
ProcessorArchitecture processor_architecture = ProcessorArchitecture.None;
#endregion
#pragma warning restore 169
-
+
+ AssemblyContentType contentType;
public AssemblyName ()
{
// defaults
return token;
}
- [MonoTODO]
public static bool ReferenceMatchesDefinition (AssemblyName reference, AssemblyName definition)
{
if (reference == null)
throw new ArgumentNullException ("reference");
if (definition == null)
throw new ArgumentNullException ("definition");
- if (reference.Name != definition.Name)
- return false;
- throw new NotImplementedException ();
+
+ // we only compare the simple assembly name to be consistent with MS .NET,
+ // which is the result of a bug in their implementation (see https://connect.microsoft.com/VisualStudio/feedback/details/752902)
+ return string.Equals (reference.Name, definition.Name, StringComparison.OrdinalIgnoreCase);
}
public void SetPublicKey (byte[] publicKey)
an.publicKey = publicKey;
an.keyToken = keyToken;
an.versioncompat = versioncompat;
+ an.processor_architecture = processor_architecture;
return an;
}
return aname;
}
+#if !MOBILE
void _AssemblyName.GetIDsOfNames ([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
{
throw new NotImplementedException ();
{
throw new NotImplementedException ();
}
+#endif
+
+ public string CultureName {
+ get {
+ return (cultureinfo == null)? null : cultureinfo.Name;
+ }
+ }
+
+ [ComVisibleAttribute(false)]
+ public AssemblyContentType ContentType {
+ get {
+ return contentType;
+ }
+ set {
+ contentType = value;
+ }
+ }
}
}