当前位置: 首页>>代码示例>>C#>>正文


C# INameDecoder类代码示例

本文整理汇总了C#中INameDecoder的典型用法代码示例。如果您正苦于以下问题:C# INameDecoder类的具体用法?C# INameDecoder怎么用?C# INameDecoder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


INameDecoder类属于命名空间,在下文中一共展示了INameDecoder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Read

 public static PersistentParameter Read(BinaryReader reader, INameDecoder nameTable)
 {
     PersistentParameter par = new PersistentParameter ();
     par.name = PersistentHelper.ReadString (reader, nameTable);
     par.documentation = PersistentHelper.ReadString (reader, nameTable);
     par.modifier = (ParameterModifier)reader.ReadByte();
     par.returnType = PersistentReturnType.Read (reader, nameTable);
     return par;
 }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:9,代码来源:PersistentParameter.cs

示例2: Read

 public static PersistentEvent Read(BinaryReader reader, INameDecoder nameTable)
 {
     PersistentEvent ev = new PersistentEvent();
     ev.FullyQualifiedName = PersistentHelper.ReadString (reader, nameTable);
     ev.Documentation = PersistentHelper.ReadString (reader, nameTable);
     ev.modifiers = (ModifierEnum)reader.ReadUInt32();
     ev.returnType = PersistentReturnType.Read (reader, nameTable);
     ev.region = PersistentRegion.Read (reader, nameTable);
     return ev;
 }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:10,代码来源:PersistentEvent.cs

示例3: Read

 public static PersistentField Read(BinaryReader reader, INameDecoder nameTable)
 {
     PersistentField field = new PersistentField ();
     field.FullyQualifiedName = PersistentHelper.ReadString (reader, nameTable);
     field.Documentation = PersistentHelper.ReadString (reader, nameTable);
     field.modifiers = (ModifierEnum)reader.ReadUInt32();
     field.returnType = PersistentReturnType.Read (reader, nameTable);
     field.region = PersistentRegion.Read (reader, nameTable);
     return field;
 }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:10,代码来源:PersistentField.cs

示例4: ReadLocation

		public static DomLocation ReadLocation (BinaryReader reader, INameDecoder nameTable)
		{
			if (ReadNull (reader)) 
				return DomLocation.Empty;
			
			int line   = reader.ReadInt32 ();
			int column = reader.ReadInt32 ();
			
			return new DomLocation (line, column);
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:10,代码来源:DomPersistence.cs

示例5: ReadRegion

		public static DomRegion ReadRegion (BinaryReader reader, INameDecoder nameTable)
		{
			if (ReadNull (reader)) 
				return DomRegion.Empty;
			
			int startLine   = reader.ReadInt32 ();
			int startColumn = reader.ReadInt32 ();
			int endLine     = reader.ReadInt32 ();
			int endColumn   = reader.ReadInt32 ();
			
			return new DomRegion (startLine, startColumn, endLine, endColumn);
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:12,代码来源:DomPersistence.cs

示例6: Read

 public static PersistentProperty Read(BinaryReader reader, INameDecoder nameTable)
 {
     PersistentProperty pro = new PersistentProperty ();
     pro.FullyQualifiedName = PersistentHelper.ReadString (reader, nameTable);
     pro.Documentation = PersistentHelper.ReadString (reader, nameTable);
     uint m = reader.ReadUInt32();
     pro.modifiers = (ModifierEnum)(m & (canGetFlag - 1));
     pro.canGet = (m & canGetFlag) == canGetFlag;
     pro.canSet = (m & canSetFlag) == canSetFlag;
     pro.returnType = PersistentReturnType.Read (reader, nameTable);
     pro.region = PersistentRegion.Read (reader, nameTable);
     return pro;
 }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:13,代码来源:PersistentProperty.cs

示例7: Read

        public static PersistentClass Read(BinaryReader reader, INameDecoder nameTable)
        {
            PersistentClass cls = new PersistentClass ();

            cls.FullyQualifiedName = PersistentHelper.ReadString (reader, nameTable);
            cls.Documentation = PersistentHelper.ReadString (reader, nameTable);

            cls.modifiers          = (ModifierEnum)reader.ReadUInt32();
            cls.classType          = (ClassType)reader.ReadInt16();

            uint count = reader.ReadUInt32();
            for (uint i = 0; i < count; ++i) {
                cls.baseTypes.Add (PersistentHelper.ReadString (reader, nameTable));
            }

            count = reader.ReadUInt32();
            for (uint i = 0; i < count; ++i) {
                cls.innerClasses.Add(PersistentClass.Read (reader, nameTable));
            }

            count = reader.ReadUInt32();
            for (uint i = 0; i < count; ++i) {
                cls.fields.Add(PersistentField.Read (reader, nameTable));
            }

            count = reader.ReadUInt32();
            for (uint i = 0; i < count; ++i) {
                cls.properties.Add(PersistentProperty.Read (reader, nameTable));
            }

            count = reader.ReadUInt32();
            for (uint i = 0; i < count; ++i) {
                IMethod m = PersistentMethod.Read (reader, nameTable);
                cls.methods.Add(m);
            }

            count = reader.ReadUInt32();
            for (uint i = 0; i < count; ++i) {
                cls.events.Add(PersistentEvent.Read (reader, nameTable));
            }

            count = reader.ReadUInt32();
            for (uint i = 0; i < count; ++i) {
                cls.indexer.Add(PersistentIndexer.Read (reader, nameTable));
            }

            cls.region = PersistentRegion.Read (reader, nameTable);
            return cls;
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:49,代码来源:PersistentClass.cs

示例8: Read

        public static PersistentIndexer Read(BinaryReader reader, INameDecoder nameTable)
        {
            PersistentIndexer ind = new PersistentIndexer();
            ind.FullyQualifiedName = PersistentHelper.ReadString (reader, nameTable);
            ind.Documentation = PersistentHelper.ReadString (reader, nameTable);
            ind.modifiers = (ModifierEnum)reader.ReadUInt32();
            ind.returnType = PersistentReturnType.Read (reader, nameTable);

            uint count = reader.ReadUInt32();
            for (uint i = 0; i < count; ++i) {
                ind.parameters.Add (PersistentParameter.Read (reader, nameTable));
            }
            ind.region = PersistentRegion.Read (reader, nameTable);
            return ind;
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:15,代码来源:PersistentIndexer.cs

示例9: Read

        public static PersistentMethod Read(BinaryReader reader, INameDecoder nameTable)
        {
            PersistentMethod met = new PersistentMethod ();
            met.FullyQualifiedName = PersistentHelper.ReadString (reader, nameTable);
            met.Documentation = PersistentHelper.ReadString (reader, nameTable);

            met.modifiers = (ModifierEnum)reader.ReadUInt32();
            met.returnType = PersistentReturnType.Read (reader, nameTable);

            uint count = reader.ReadUInt32();
            for (uint i = 0; i < count; ++i) {
                met.parameters.Add (PersistentParameter.Read (reader, nameTable));
            }
            met.region = PersistentRegion.Read (reader, nameTable);
            return met;
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:16,代码来源:PersistentMethod.cs

示例10: Read

        public static PersistentReturnType Read(BinaryReader reader, INameDecoder nameTable)
        {
            if (PersistentHelper.ReadNull (reader)) return null;

            PersistentReturnType rt = new PersistentReturnType ();
            rt.FullyQualifiedName = PersistentHelper.ReadString (reader, nameTable);

            rt.pointerNestingLevel = reader.ReadInt32();

            uint count = reader.ReadUInt32();
            rt.arrayDimensions = new int[count];
            for (uint i = 0; i < rt.arrayDimensions.Length; ++i) {
                rt.arrayDimensions[i] = reader.ReadInt32();
            }
            return rt;
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:16,代码来源:PersistentReturnType.cs

示例11: ReadTypeParameter

		public static TypeParameter ReadTypeParameter (BinaryReader reader, INameDecoder nameTable)
		{
			string name = ReadString (reader, nameTable);
			TypeParameter tp = new TypeParameter (name);
			
			// Flags
			
			byte f = reader.ReadByte ();
			if ((f & 1) != 0)
				tp.ClassRequired = true;
			if ((f & 2) != 0)
				tp.ValueTypeRequired = true;
			if ((f & 4) != 0)
				tp.ConstructorRequired = true;

			// Variance 

			tp.Variance = (TypeParameterVariance)reader.ReadByte ();

			// Constraints
			
			uint count = ReadUInt (reader, 1000);
			while (count-- > 0)
				tp.AddConstraint (ReadReturnType (reader, nameTable));

			// Attributes
			
			count = ReadUInt (reader, 1000);
			while (count-- > 0)
				tp.AddAttribute (ReadAttribute (reader, nameTable));

			return tp;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:33,代码来源:DomPersistence.cs

示例12: ReadTypeInternal

		static DomType ReadTypeInternal (BinaryReader reader, INameDecoder nameTable, IDomObjectTable objectTable)
		{
			uint typeCount = ReadUInt (reader, 1000);
			if (typeCount > 1) {
				CompoundType compoundResult = new CompoundType ();
				while (typeCount-- > 0) {
					compoundResult.AddPart (ReadTypeInternal (reader, nameTable, objectTable));
				}
				
				return compoundResult;
			}
			
			DomType result = new DomType ();
			ReadMemberInformation (reader, nameTable, objectTable, result);
			//			bool verbose = result.Name == "CopyDelegate";
			//			if (verbose) System.Console.WriteLine("read type:" + result.Name);
			result.TypeModifier = (TypeModifier)reader.ReadUInt32 ();
			result.BodyRegion = ReadRegion (reader, nameTable);
			string compilationUnitFileName = ReadString (reader, nameTable);
			result.CompilationUnit = new CompilationUnit (compilationUnitFileName);
			
			result.Namespace = ReadString (reader, nameTable);
			result.ClassType = (ClassType)reader.ReadUInt32 ();
			result.BaseType = ReadReturnType (reader, nameTable, objectTable);
			
			// implemented interfaces
			long count = ReadUInt (reader, 5000);
			//			if (verbose) System.Console.WriteLine("impl. interfaces:" + count);
			while (count-- > 0) {
				result.AddInterfaceImplementation (ReadReturnType (reader, nameTable, objectTable));
			}
			
			// innerTypes
			//			if (verbose) System.Console.WriteLine("pos:" + reader.BaseStream.Position);
			count = ReadUInt (reader, 10000);
			//			if (verbose) System.Console.WriteLine("inner types:" + count);
			while (count-- > 0) {
				DomType innerType = ReadTypeInternal (reader, nameTable, objectTable);
				innerType.DeclaringType = result;
				result.Add (innerType);
			}
			
			// fields
			//			if (verbose) System.Console.WriteLine("pos:" + reader.BaseStream.Position);
			count = ReadUInt (reader, 10000);
			//			if (verbose) System.Console.WriteLine("fields:" + count);
			while (count-- > 0) {
				DomField field = ReadField (reader, nameTable, objectTable);
				field.DeclaringType = result;
				result.Add (field);
			}
			
			// methods
			//			if (verbose) System.Console.WriteLine("pos:" + reader.BaseStream.Position);
			count = ReadUInt (reader, 10000);
			//			if (verbose) System.Console.WriteLine("methods:" + count);
			while (count-- > 0) {
				DomMethod method = ReadMethod (reader, nameTable, objectTable);
				method.DeclaringType = result;
				result.Add (method);
			}
			
			// properties
			//			if (verbose) System.Console.WriteLine("pos:" + reader.BaseStream.Position);
			count = ReadUInt (reader, 10000);
			//			if (verbose) System.Console.WriteLine("properties:" + count);
			while (count-- > 0) {
				DomProperty property = ReadProperty (reader, nameTable, objectTable);
				property.DeclaringType = result;
				result.Add (property);
			}
			
			// events
			//			if (verbose) System.Console.WriteLine("pos:" + reader.BaseStream.Position);
			count = ReadUInt (reader, 10000);
			//			if (verbose) System.Console.WriteLine("events:" + count);
			while (count-- > 0) {
				DomEvent evt = ReadEvent (reader, nameTable, objectTable);
				evt.DeclaringType = result;
				result.Add (evt);
			}
			
			// type parameters
			count = ReadUInt (reader, 500);
			while (count-- > 0) {
				TypeParameter tp = ReadTypeParameter (reader, nameTable, objectTable);
				result.AddTypeParameter (tp);
			}
			return result;
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:90,代码来源:DomPersistence.cs

示例13: ReadName

        /// <summary>
        /// Reads the name of an element from the reader.
        /// </summary>
        /// <param name="nameDecoder">The name decoder.</param>
        /// <returns>
        /// The name of the element.
        /// </returns>
        public override string ReadName(INameDecoder nameDecoder)
        {
            if (nameDecoder == null)
            {
                throw new ArgumentNullException("nameDecoder");
            }

            if (Disposed) { ThrowObjectDisposedException(); }
            if (State == BsonReaderState.Type)
            {
                ReadBsonType();
            }
            if (State != BsonReaderState.Name)
            {
                ThrowInvalidState("ReadName", BsonReaderState.Name);
            }

            nameDecoder.Inform(CurrentName);
            State = BsonReaderState.Value;
            return CurrentName;
        }
开发者ID:mfidemraizer,项目名称:mongo-csharp-driver,代码行数:28,代码来源:BsonDocumentReader.cs

示例14: ReadField

		public static DomField ReadField (BinaryReader reader, INameDecoder nameTable, IDomObjectTable objectTable)
		{
			DomField result = new DomField ();
			ReadMemberInformation (reader, nameTable, objectTable, result);
			result.ReturnType = ReadReturnType (reader, nameTable, objectTable);
			return result;
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:7,代码来源:DomPersistence.cs

示例15: ReadMemberInformation

		static void ReadMemberInformation (BinaryReader reader, INameDecoder nameTable, IDomObjectTable objectTable, AbstractMember member)
		{
			member.Name          = ReadString (reader, nameTable);
			member.Documentation = ReadString (reader, nameTable);
			member.Modifiers     = (Modifiers)reader.ReadUInt32();
			member.Location      = ReadLocation (reader, nameTable);
			
			uint count = ReadUInt (reader, 1000);
			while (count-- > 0)
				member.Add (ReadAttribute (reader, nameTable, objectTable));
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:11,代码来源:DomPersistence.cs


注:本文中的INameDecoder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。