You've already forked linux-packaging-mono
Imported Upstream version 6.4.0.137
Former-commit-id: 943baa9f16a098c33e129777827f3a9d20da00d6
This commit is contained in:
parent
e9207cf623
commit
ef583813eb
@ -151,11 +151,7 @@ namespace System.Reflection {
|
||||
if (codebase == null)
|
||||
return null;
|
||||
|
||||
#if NETCORE
|
||||
throw new NotImplementedException ();
|
||||
#else
|
||||
return Mono.Security.Uri.EscapeString (codebase, false, true, true);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -286,12 +282,7 @@ namespace System.Reflection {
|
||||
#if MOBILE || NETCORE
|
||||
return true;
|
||||
#else
|
||||
try {
|
||||
CryptoConvert.FromCapiPublicKeyBlob (
|
||||
publicKey, 12);
|
||||
return true;
|
||||
} catch (CryptographicException) {
|
||||
}
|
||||
return CryptoConvert.TryImportCapiPublicKeyBlob (publicKey, 12);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
@ -299,12 +290,7 @@ namespace System.Reflection {
|
||||
#if MOBILE || NETCORE
|
||||
return true;
|
||||
#else
|
||||
try {
|
||||
CryptoConvert.FromCapiPublicKeyBlob (publicKey);
|
||||
return true;
|
||||
} catch (CryptographicException) {
|
||||
}
|
||||
break;
|
||||
return CryptoConvert.TryImportCapiPublicKeyBlob (publicKey, 0);
|
||||
#endif
|
||||
case 0x07: // private key
|
||||
break;
|
||||
@ -487,8 +473,13 @@ namespace System.Reflection {
|
||||
|
||||
this.major = native->major;
|
||||
this.minor = native->minor;
|
||||
#if NETCORE
|
||||
this.build = native->build == 65535 ? -1 : native->build;
|
||||
this.revision = native->revision == 65535 ? -1 : native->revision;
|
||||
#else
|
||||
this.build = native->build;
|
||||
this.revision = native->revision;
|
||||
#endif
|
||||
|
||||
this.flags = (AssemblyNameFlags)native->flags;
|
||||
|
||||
@ -497,13 +488,29 @@ namespace System.Reflection {
|
||||
this.versioncompat = AssemblyVersionCompatibility.SameMachine;
|
||||
this.processor_architecture = (ProcessorArchitecture)native->arch;
|
||||
|
||||
#if NETCORE
|
||||
if (addVersion) {
|
||||
if (this.build == -1)
|
||||
this.version = new Version (this.major, this.minor);
|
||||
else if (this.revision == -1)
|
||||
this.version = new Version (this.major, this.minor, this.build);
|
||||
else
|
||||
this.version = new Version (this.major, this.minor, this.build, this.revision);
|
||||
}
|
||||
#else
|
||||
if (addVersion)
|
||||
this.version = new Version (this.major, this.minor, this.build, this.revision);
|
||||
#endif
|
||||
|
||||
this.codebase = codeBase;
|
||||
|
||||
#if NETCORE
|
||||
if (native->culture != IntPtr.Zero)
|
||||
this.cultureinfo = CultureInfo.GetCultureInfo (RuntimeMarshal.PtrToUtf8String (native->culture));
|
||||
#else
|
||||
if (native->culture != IntPtr.Zero)
|
||||
this.cultureinfo = CultureInfo.CreateCulture ( RuntimeMarshal.PtrToUtf8String (native->culture), assemblyRef);
|
||||
#endif
|
||||
|
||||
if (native->public_key != IntPtr.Zero) {
|
||||
this.publicKey = RuntimeMarshal.DecodeBlobArray (native->public_key);
|
||||
@ -530,10 +537,16 @@ namespace System.Reflection {
|
||||
{
|
||||
AssemblyName aname = new AssemblyName ();
|
||||
unsafe {
|
||||
MonoAssemblyName *native = GetNativeName (assembly._mono_assembly);
|
||||
MonoAssemblyName *native = GetNativeName (assembly.MonoAssembly);
|
||||
aname.FillName (native, fillCodebase ? assembly.CodeBase : null, true, true, true, false);
|
||||
}
|
||||
return aname;
|
||||
}
|
||||
|
||||
#if NETCORE
|
||||
internal static string EscapeCodeBase (string codebase) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user