Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Assembly.cs « System.Reflection « corlib « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 88c89dad0a8172227cb98facee82dadd16fce38d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
//
// System.Reflection/Assembly.cs
//
// Author:
//   Paolo Molaro (lupus@ximian.com)
//
// (C) 2001 Ximian, Inc.  http://www.ximian.com
//

using System;
using System.Security.Policy;
using System.Runtime.Serialization;
using System.Reflection.Emit;
using System.IO;
using System.Globalization;
using System.Runtime.CompilerServices;

namespace System.Reflection {

	public class Assembly : System.Reflection.ICustomAttributeProvider,
		System.Security.IEvidenceFactory, System.Runtime.Serialization.ISerializable {
		private IntPtr _mono_assembly;

		[MethodImplAttribute (MethodImplOptions.InternalCall)]
		private extern string get_code_base ();
		
		public virtual string CodeBase {
			get {
				return get_code_base ();
			}
		}

		public virtual string CopiedCodeBase {
			get {
				return null;
			}
		} 

		public virtual string FullName {
			get {
				//
				// FIXME: This is wrong, but it gets us going
				// in the compiler for now
				//
				return CodeBase;
			}
		}

		public virtual MethodInfo EntryPoint {
			get {
				return null;
			}
		}

		public virtual Evidence Evidence {
			get {
				return null;
			}
		}

		public virtual String Location {
			get {
				return null;
			}
		}

		public virtual void GetObjectData (SerializationInfo info, StreamingContext context)
		{
		}

		public virtual bool IsDefined (Type attributeType, bool inherit)
		{
			return MonoCustomAttrs.IsDefined (this, attributeType, inherit);
		}

		public virtual object [] GetCustomAttributes (bool inherit)
		{
			return MonoCustomAttrs.GetCustomAttributes (this, inherit);
		}

		public virtual object [] GetCustomAttributes (Type attributeType, bool inherit)
		{
			return MonoCustomAttrs.GetCustomAttributes (this, attributeType, inherit);
		}

		public virtual void RemoveOnTypeResolve (ResolveEventHandler handler)
		{
			throw new NotImplementedException ();
		}

		public virtual void AddOnTypeResolve (ResolveEventHandler handler)
		{
			throw new NotImplementedException ();
		}

		public virtual void RemoveOnResourceResolve (ResolveEventHandler handler)
		{
			throw new NotImplementedException ();
		}
		
		public virtual void AddOnResourceResolve (ResolveEventHandler handler)
		{
			throw new NotImplementedException ();
		}

		public virtual ModuleBuilder DefineDynamicModule (String name, Boolean emitSymbolInfo)
		{
			throw new NotImplementedException ();
		}

		public virtual ModuleBuilder DefineDynamicModule (String name)
		{
			throw new NotImplementedException ();
		}

		public virtual FileStream[] GetFiles ()
		{
			throw new NotImplementedException ();
		}

		public virtual FileStream GetFile (String name)
		{
			throw new NotImplementedException ();
		}

		public virtual Stream GetManifestResourceStream (String name)
		{
			throw new NotImplementedException ();
		}

		public virtual Stream GetManifestResourceStream (Type type, String name)
		{
			throw new NotImplementedException ();
		}

		public virtual Type[] GetTypes ()
		{
			throw new NotImplementedException ();
		}

		public virtual Type[] GetExportedTypes ()
		{
			throw new NotImplementedException ();
		}

		public virtual Type GetType (String name, Boolean throwOnError)
		{
			return GetType (name, throwOnError, false);
		}

		public virtual Type GetType (String name) {
			return GetType (name, false, false);
		}

		[MethodImplAttribute (MethodImplOptions.InternalCall)]
		public extern Type GetType (String name, Boolean throwOnError, Boolean ignoreCase);
		
		public virtual AssemblyName GetName (Boolean copiedName)
		{
			throw new NotImplementedException ();
		}

		public virtual AssemblyName GetName ()
		{
			throw new NotImplementedException ();
		}

		public override String ToString ()
		{
			return GetName ().Name;
		}

		[MonoTODO]
		public static String CreateQualifiedName (String assemblyName, String typeName) 
		{
			return "FIXME: assembly";
		}

		[MonoTODO]
		public static String nCreateQualifiedName (String assemblyName, String typeName)
		{
			return "FIXME: assembly";
		}

		[MonoTODO]
		public static Assembly GetAssembly (Type type)
		{
			throw new NotImplementedException ();
		}

		[MonoTODO]
		public Assembly GetSatelliteAssembly (CultureInfo culture)
		{
			throw new NotImplementedException ();
		}

		public static Assembly LoadFrom (String assemblyFile)
		{
			return AppDomain.CurrentDomain.Load (assemblyFile);
		}

		public static Assembly Load (String assemblyString)
		{
			return AppDomain.CurrentDomain.Load (assemblyString);
		}
		
		public static Assembly Load (String assemblyString, Evidence assemblySecurity)
		{
			return AppDomain.CurrentDomain.Load (assemblyString, assemblySecurity);
		}

		public static Assembly Load (AssemblyName assemblyRef)
		{
			return AppDomain.CurrentDomain.Load (assemblyRef);
		}

		public static Assembly Load (AssemblyName assemblyRef, Evidence assemblySecurity)
		{
			return AppDomain.CurrentDomain.Load (assemblyRef, assemblySecurity);
		}

		public static Assembly Load (Byte[] rawAssembly)
		{
			return AppDomain.CurrentDomain.Load (rawAssembly);
		}

		public static Assembly Load (Byte[] rawAssembly, Byte[] rawSymbolStore)
		{
			return AppDomain.CurrentDomain.Load (rawAssembly, rawSymbolStore);
		}

		public static Assembly Load (Byte[] rawAssembly, Byte[] rawSymbolStore,
					     Evidence securityEvidence)
		{
			return AppDomain.CurrentDomain.Load (rawAssembly, rawSymbolStore, securityEvidence);
		}

		public Object CreateInstance (String typeName) 
		{
			throw new NotImplementedException ();
		}

		public Object CreateInstance (String typeName, Boolean ignoreCase)
		{
			throw new NotImplementedException ();
		}

		public Object CreateInstance (String typeName, Boolean ignoreCase,
					      BindingFlags bindingAttr, Binder binder,
					      Object[] args, CultureInfo culture,
					      Object[] activationAttributes)
		{
			throw new NotImplementedException ();
		}

		public Module[] GetLoadedModules ()
		{
			throw new NotImplementedException ();
		}

		public Module[] GetModules ()
		{
			throw new NotImplementedException ();
		}

		public Module GetModule (String name)
		{
			throw new NotImplementedException ();
		}

		public String[] GetManifestResourceNames ()
		{
			throw new NotImplementedException ();
		}

		public static Assembly GetExecutingAssembly ()
		{
			throw new NotImplementedException ();
		}

		public AssemblyName[] GetReferencedAssemblies ()
		{
			throw new NotImplementedException ();
		}

		public ManifestResourceInfo GetManifestResourceInfo (String resourceName)
		{
			throw new NotImplementedException ();
		}

		public static Assembly Load (AssemblyName assemblyRef, Evidence assemblySecurity,
					     String callerLocation)
		{
			throw new NotImplementedException ();
		}

		public static Assembly Load (String assemblyString, Evidence assemblySecurity,
					     String callerLocation)
		{
			throw new NotImplementedException ();
		}

	}
}