예제 #1
0
파일: namespace.cs 프로젝트: cthrax/mono
		public void ReplaceTypeWithPredefined (TypeSpec ts, PredefinedTypeSpec pts)
		{
			var found = types [ts.Name];
			cached_types.Remove (ts.Name);
			if (found.Count == 1) {
				types[ts.Name][0] = pts;
			} else {
				throw new NotImplementedException ();
			}
		}
예제 #2
0
	public static IList<PredefinedTypeSpec> InitCoreTypes ()
	{
		var core_types = new PredefinedTypeSpec[] {
			object_type = new PredefinedTypeSpec (MemberKind.Class, "System", "Object"),
			value_type = new PredefinedTypeSpec (MemberKind.Class, "System", "ValueType"),
			attribute_type = new PredefinedTypeSpec (MemberKind.Class, "System", "Attribute"),

			int32_type = new PredefinedTypeSpec (MemberKind.Struct, "System", "Int32"),
			int64_type = new PredefinedTypeSpec (MemberKind.Struct, "System", "Int64"),
			uint32_type = new PredefinedTypeSpec (MemberKind.Struct, "System", "UInt32"),
			uint64_type = new PredefinedTypeSpec (MemberKind.Struct, "System", "UInt64"),
			byte_type = new PredefinedTypeSpec (MemberKind.Struct, "System", "Byte"),
			sbyte_type = new PredefinedTypeSpec (MemberKind.Struct, "System", "SByte"),
			short_type = new PredefinedTypeSpec (MemberKind.Struct, "System", "Int16"),
			ushort_type = new PredefinedTypeSpec (MemberKind.Struct, "System", "UInt16"),

			ienumerator_type = new PredefinedTypeSpec (MemberKind.Interface, "System.Collections", "IEnumerator"),
			ienumerable_type = new PredefinedTypeSpec (MemberKind.Interface, "System.Collections", "IEnumerable"),
			idisposable_type = new PredefinedTypeSpec (MemberKind.Interface, "System", "IDisposable"),

			char_type = new PredefinedTypeSpec (MemberKind.Struct, "System", "Char"),
			string_type = new PredefinedTypeSpec (MemberKind.Class, "System", "String"),
			float_type = new PredefinedTypeSpec (MemberKind.Struct, "System", "Single"),
			double_type = new PredefinedTypeSpec (MemberKind.Struct, "System", "Double"),
			decimal_type = new PredefinedTypeSpec (MemberKind.Struct, "System", "Decimal"),
			bool_type = new PredefinedTypeSpec (MemberKind.Struct, "System", "Boolean"),
			intptr_type = new PredefinedTypeSpec (MemberKind.Struct, "System", "IntPtr"),
			uintptr_type = new PredefinedTypeSpec (MemberKind.Struct, "System", "UIntPtr"),

			multicast_delegate_type = new PredefinedTypeSpec (MemberKind.Class, "System", "MulticastDelegate"),
			delegate_type = new PredefinedTypeSpec (MemberKind.Class, "System", "Delegate"),
			enum_type = new PredefinedTypeSpec (MemberKind.Class, "System", "Enum"),
			array_type = new PredefinedTypeSpec (MemberKind.Class, "System", "Array"),
			void_type = new PredefinedTypeSpec (MemberKind.Struct, "System", "Void"),
			type_type = new PredefinedTypeSpec (MemberKind.Class, "System", "Type"),
			exception_type = new PredefinedTypeSpec (MemberKind.Class, "System", "Exception"),
			runtime_field_handle_type = new PredefinedTypeSpec (MemberKind.Struct, "System", "RuntimeFieldHandle"),
			runtime_handle_type = new PredefinedTypeSpec (MemberKind.Struct, "System", "RuntimeTypeHandle"),
		};

		return core_types;
	}
예제 #3
0
파일: class.cs 프로젝트: pgoron/monodevelop
		//
		// Replaces normal spec with predefined one when compiling corlib
		// and this type container defines predefined type
		//
		public void SetPredefinedSpec (PredefinedTypeSpec spec)
		{
			this.spec = spec;
		}