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


C# TypeSpec类代码示例

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


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

示例1: EnumToBoolMapping

        public EnumToBoolMapping(XmlElement element, TypeSpec fcsType)
        {
            enumValue = element.GetAttribute("FCSValue");
            boolMemberName = element.GetAttribute("ForeignMember");
            FCSType = fcsType;

        }
开发者ID:killbug2004,项目名称:WSProf,代码行数:7,代码来源:EnumToBoolMapping.cs

示例2: Type

            /// <summary>
            /// Read ctor
            /// </summary>
            internal Type(TypeSpec parent, ResReader reader)
                : base(reader, ChunkTypes.RES_TABLE_TYPE_TYPE)
            {
                this.parent = parent;

                var id = reader.ReadByte();
                reader.Skip(3); // reserved
                if (id != parent.Id)
                {
                    throw new IOException("Type id (" + id + ") " + "doesn't match parent id (" + parent.Id + ").");
                }
                var entryCount = reader.ReadInt32();
                if (entryCount != parent.EntryCount)
                {
                    throw new IOException(string.Format("Type entry count ({0}) doesn't match parent entry count ({1})", entryCount, parent.EntryCount));
                }
                var entriesStart = reader.ReadInt32();
                configuration = new Configuration(reader);
                // Data
                var offsets = reader.ReadIntArray(entryCount);
                var dataSize = (Size - entriesStart);
                if ((dataSize % 4) != 0)
                {
                    throw new IOException("Type data size (" + dataSize + ") is not multiple of 4.");
                }
                for (var i = 0; i < entryCount; i++ )
                {
                    if (offsets[i] != NO_ENTRY)
                    {
                        var actualOffset = reader.Position;
                        var instance = EntryInstance.Read(this, reader);
                        parent.GetEntry(i).Add(instance);
                    } 
                }
            }
开发者ID:Xtremrules,项目名称:dot42,代码行数:38,代码来源:Table.Type.cs

示例3: RequestMsg

 /// <summary>
 /// This .ctor is handy for message inspectors.
 /// Creates a substitute message for the original one with new values.
 /// Binding-specific context is cloned and headers/correlation data are cloned conditionaly
 /// </summary>
 protected RequestMsg(RequestMsg inspectedOriginal,
                   TypeSpec contract, MethodSpec method, bool oneWay, Guid? instance, 
                   bool cloneHeaders = true, bool cloneCorrelation = true) : this(contract, method, oneWay, instance)
 {
   m_ServerTransport = inspectedOriginal.m_ServerTransport;
   CloneState(inspectedOriginal, cloneHeaders, cloneCorrelation);
 }
开发者ID:vlapchenko,项目名称:nfx,代码行数:12,代码来源:RequestMsg.cs

示例4: InitializeTypes

        private static void InitializeTypes(SymbolTableStack symtabstack)
        {
            // int
            IntegerId = symtabstack.CreateInLocal("integer");
            IntegerType = TypeSpec.CreateType(TypeForm.Scalar);
            IntegerType.Identifier = IntegerId;
            IntegerId.Definition = Definition.TYPE;
            IntegerId.Type = IntegerType;

            // real
            RealId = symtabstack.CreateInLocal("real");
            RealType = TypeSpec.CreateType(TypeForm.Scalar);
            RealType.Identifier = RealId;
            RealId.Definition = Definition.TYPE;
            RealId.Type = RealType;

            // boolean
            BooleanId = symtabstack.CreateInLocal("boolean");
            BooleanType = TypeSpec.CreateType(TypeForm.Enumeration);
            BooleanType.Identifier = BooleanId;
            BooleanId.Definition = Definition.TYPE;
            BooleanId.Type = BooleanType;

            // char
            CharId = symtabstack.CreateInLocal("char");
            CharType = TypeSpec.CreateType(TypeForm.Scalar);
            CharType.Identifier = CharId;
            CharId.Definition = Definition.TYPE;
            CharId.Type = CharType;

            //
            UndefinedType = TypeSpec.CreateType(TypeForm.Scalar);
        }
开发者ID:jstark,项目名称:dradis,代码行数:33,代码来源:Predefined.cs

示例5: RequestAnyMsg

 /// <summary>
 /// This .ctor is handy for message inspectors.
 /// Creates a substitute message for the original one with new values.
 /// Binding-specific context is cloned and headers/correlation data are cloned conditionaly
 /// </summary>
 public RequestAnyMsg(RequestMsg inspectedOriginal,
     TypeSpec contract, MethodSpec method, bool oneWay, Guid? instance, object[] args,
     bool cloneHeaders = true, bool cloneCorrelation = true)
     : base(inspectedOriginal, contract, method, oneWay, instance, cloneHeaders, cloneCorrelation)
 {
     m_Arguments = args;
 }
开发者ID:itadapter,项目名称:nfx,代码行数:12,代码来源:RequestMsg.cs

示例6: BaseClassMapping

        protected BaseClassMapping(XmlElement node)
        {
            FCSType = new TypeSpec(node.GetAttribute("FCSType"), TypeSpec.TypeSpecCategories.FCSType);
            ForeignType = new TypeSpec(node.GetAttribute("ForeignType"), TypeSpec.TypeSpecCategories.ForeignType);

            ForeignType.HeaderFile = XmlUtils.GetOptionalAttribute(node, "HeaderFile");
        }
开发者ID:killbug2004,项目名称:WSProf,代码行数:7,代码来源:BaseClassMapping.cs

示例7: CreateNestedDelta

 protected virtual object CreateNestedDelta(object propValue, TypeSpec propValueType, Type propertyType)
 {
     if (propValueType.SerializationMode == TypeSerializationMode.Structured)
         return new ObjectDelta(propValue, propValueType, TypeMapper, this);
     if (propValueType.IsCollection)
         return new CollectionDelta(propValue, propValueType, TypeMapper, this);
     throw new NotImplementedException();
 }
开发者ID:Pomona,项目名称:Pomona,代码行数:8,代码来源:Delta.cs

示例8: AuthServiceClient

 //static .ctor
 static AuthServiceClient()
 {
     var t = typeof(IAuthService);
     s_ts_CONTRACT = new TypeSpec(t);
     s_ms_CloseSession = new MethodSpec(t.GetMethod("CloseSession", new Type[] { typeof(Guid) }));
     s_ms_CreateSession = new MethodSpec(t.GetMethod("CreateSession", new Type[] { typeof(long) }));
     s_ms_GetSessionUser = new MethodSpec(t.GetMethod("GetSessionUser", new Type[] { typeof(Guid) }));
 }
开发者ID:Axaprj,项目名称:BLService,代码行数:9,代码来源:AuthServiceClient.cs

示例9: PomonaJsonSerializerTypeEntry

        public PomonaJsonSerializerTypeEntry(TypeSpec type)
        {
            if (type == null)
                throw new ArgumentNullException(nameof(type));
            this.type = type;

            BuildAcceleratedPropertyWritingAction();
        }
开发者ID:Pomona,项目名称:Pomona,代码行数:8,代码来源:PomonaJsonSerializerTypeEntry.cs

示例10: TestContractAClient

 //static .ctor
 static TestContractAClient()
 {
     var t = typeof(NFX.NUnit.Glue.ITestContractA);
      s_ts_CONTRACT = new TypeSpec(t);
      @s_ms_Method1_0 = new MethodSpec(t.GetMethod("Method1", new Type[]{ typeof(@[email protected]) }));
      @s_ms_Method2_1 = new MethodSpec(t.GetMethod("Method2", new Type[]{ typeof(@[email protected]) }));
      @s_ms_Sleeper_2 = new MethodSpec(t.GetMethod("Sleeper", new Type[]{ typeof(@[email protected]) }));
 }
开发者ID:vlapchenko,项目名称:nfx,代码行数:9,代码来源:TestObjects_A.cs

示例11: Delta

 protected Delta(object original, TypeSpec type, ITypeMapper typeMapper, Delta parent = null)
 {
     if (original == null) throw new ArgumentNullException("original");
     if (type == null) throw new ArgumentNullException("type");
     if (typeMapper == null) throw new ArgumentNullException("typeMapper");
     Original = original;
     Type = type;
     TypeMapper = typeMapper;
     this.parent = parent;
 }
开发者ID:BeeWarloc,项目名称:Pomona,代码行数:10,代码来源:Delta.cs

示例12: Error_InvalidConstantType

 public static void Error_InvalidConstantType(TypeSpec t, Location loc, Report Report)
 {
     if (t.IsGenericParameter) {
         Report.Error (1959, loc,
             "Type parameter `{0}' cannot be declared const", TypeManager.CSharpName (t));
     } else {
         Report.Error (283, loc,
             "The type `{0}' cannot be declared const", TypeManager.CSharpName (t));
     }
 }
开发者ID:RainsSoft,项目名称:MonoCompilerAsAService,代码行数:10,代码来源:const.cs

示例13: ItemValueDeserializerNode

 public ItemValueDeserializerNode(TypeSpec expectedBaseType,
                                  IDeserializationContext context,
                                  string expandPath = "",
                                  IDeserializerNode parent = null)
 {
     Parent = parent;
     ExpectedBaseType = expectedBaseType;
     Context = context;
     ExpandPath = expandPath;
     this.valueType = expectedBaseType;
 }
开发者ID:Pomona,项目名称:Pomona,代码行数:11,代码来源:ItemValueDeserializerNode.cs

示例14: MemberSpec

        public MemberSpec(string specText, TypeSpec.TypeSpecCategories typeCategory)
        {
            int index = specText.LastIndexOf(' ');
            string[] bits = new string[2];
            bits[0] = specText.Substring(0, index);
            bits[1] = specText.Substring(index + 1);

            Type = new TypeSpec(bits[0], typeCategory);
            Name = bits[1];

        }
开发者ID:killbug2004,项目名称:WSProf,代码行数:11,代码来源:MemberSpec.cs

示例15: JokeContractClient

 //static .ctor
 static JokeContractClient()
 {
     var t = typeof(@[email protected]);
      s_ts_CONTRACT = new TypeSpec(t);
      @s_ms_Echo_0 = new MethodSpec(t.GetMethod("Echo", new Type[]{ typeof(@[email protected]) }));
      @s_ms_UnsecureEcho_1 = new MethodSpec(t.GetMethod("UnsecureEcho", new Type[]{ typeof(@[email protected]) }));
      @s_ms_UnsecEchoMar_2 = new MethodSpec(t.GetMethod("UnsecEchoMar", new Type[]{ typeof(@[email protected]) }));
      @s_ms_SimpleWorkAny_3 = new MethodSpec(t.GetMethod("SimpleWorkAny", new Type[]{ typeof(@[email protected]), typeof(@[email protected]), typeof(@[email protected]), typeof(@[email protected]), typeof(@[email protected]) }));
      @s_ms_SimpleWorkMar_4 = new MethodSpec(t.GetMethod("SimpleWorkMar", new Type[]{ typeof(@[email protected]), typeof(@[email protected]), typeof(@[email protected]), typeof(@[email protected]), typeof(@[email protected]) }));
      @s_ms_DBWork_5 = new MethodSpec(t.GetMethod("DBWork", new Type[]{ typeof(@[email protected]), typeof(@[email protected]), typeof(@[email protected]) }));
      @s_ms_Notify_6 = new MethodSpec(t.GetMethod("Notify", new Type[]{ typeof(@[email protected]) }));
      @s_ms_ObjectWork_7 = new MethodSpec(t.GetMethod("ObjectWork", new Type[]{ typeof(@[email protected]) }));
 }
开发者ID:itadapter,项目名称:nfx,代码行数:14,代码来源:JokeContractClient.cs


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