[StructLayout (LayoutKind.Sequential)]
#if MOBILE
public partial class Assembly : ICustomAttributeProvider {
-#elif NET_4_0
- public abstract class Assembly : ICustomAttributeProvider, _Assembly, IEvidenceFactory, ISerializable {
#else
- public partial class Assembly : ICustomAttributeProvider, _Assembly, IEvidenceFactory, ISerializable {
+ public abstract class Assembly : ICustomAttributeProvider, _Assembly, IEvidenceFactory, ISerializable {
#endif
internal class ResolveEventHolder {
public event ModuleResolveEventHandler ModuleResolve;
private bool fromByteArray;
private string assemblyName;
-#if NET_4_0
protected
-#else
- internal
-#endif
Assembly ()
{
resolve_event_holder = new ResolveEventHolder ();
return LoadFrom (assemblyFile, false);
}
-#if NET_4_0
[Obsolete]
-#endif
public static Assembly LoadFrom (String assemblyFile, Evidence securityEvidence)
{
Assembly a = LoadFrom (assemblyFile, false);
return a;
}
-#if NET_4_0
[Obsolete]
-#endif
[MonoTODO("This overload is not currently implemented")]
// FIXME: What are we missing?
public static Assembly LoadFrom (String assemblyFile, Evidence securityEvidence, byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
throw new NotImplementedException ();
}
-#if NET_4_0
[MonoTODO]
public static Assembly LoadFrom (String assemblyFile, byte [] hashValue, AssemblyHashAlgorithm hashAlgorithm)
{
throw new NotImplementedException ();
}
-#endif
-#if NET_4_0
public static Assembly UnsafeLoadFrom (String assemblyFile)
{
return LoadFrom (assemblyFile);
}
-#endif
-#if NET_4_0
[Obsolete]
-#endif
public static Assembly LoadFile (String path, Evidence securityEvidence)
{
if (path == null)
return AppDomain.CurrentDomain.Load (assemblyString);
}
-#if NET_4_0
[Obsolete]
-#endif
public static Assembly Load (String assemblyString, Evidence assemblySecurity)
{
return AppDomain.CurrentDomain.Load (assemblyString, assemblySecurity);
return AppDomain.CurrentDomain.Load (assemblyRef);
}
-#if NET_4_0
[Obsolete]
-#endif
public static Assembly Load (AssemblyName assemblyRef, Evidence assemblySecurity)
{
return AppDomain.CurrentDomain.Load (assemblyRef, assemblySecurity);
return AppDomain.CurrentDomain.Load (rawAssembly, rawSymbolStore);
}
-#if NET_4_0
[Obsolete]
-#endif
public static Assembly Load (Byte[] rawAssembly, Byte[] rawSymbolStore,
Evidence securityEvidence)
{
return AppDomain.CurrentDomain.Load (rawAssembly, rawSymbolStore, securityEvidence);
}
-#if NET_4_0
[MonoLimitation ("Argument securityContextSource is ignored")]
public static Assembly Load (byte [] rawAssembly, byte [] rawSymbolStore, SecurityContextSource securityContextSource)
{
return AppDomain.CurrentDomain.Load (rawAssembly, rawSymbolStore);
}
-#endif
public static Assembly ReflectionOnlyLoad (byte[] rawAssembly)
{
[MonoTODO ("Not implemented")]
public
-#if NET_4_0
virtual
-#endif
Module LoadModule (string moduleName, byte [] rawModule, byte [] rawSymbolStore)
{
throw new NotImplementedException ();
}
public
-#if NET_4_0
virtual
-#endif
Object CreateInstance (String typeName, Boolean ignoreCase,
BindingFlags bindingAttr, Binder binder,
Object[] args, CultureInfo culture,
[MonoTODO ("Currently it always returns zero")]
[ComVisible (false)]
public
-#if NET_4_0
virtual
-#endif
long HostContext {
get { return 0; }
}
}
}
-#if NET_4_0
public virtual PermissionSet PermissionSet {
get { return this.GrantedPermissionSet; }
}
public virtual SecurityRuleSet SecurityRuleSet {
get { throw CreateNIE (); }
}
-#endif
#endif
-#if NET_4_0
static Exception CreateNIE ()
{
return new NotImplementedException ("Derived classes must implement it");
return true;
return !left.Equals (right);
}
-#endif
#if NET_4_5
public virtual IEnumerable<TypeInfo> DefinedTypes {