System.Runtime.Serialization.Formatters.Binary.Converter.ToType C# (CSharp) Method

ToType() static private method

static private ToType ( InternalPrimitiveTypeE code ) : Type
code InternalPrimitiveTypeE
return System.Type
        internal static Type ToType(InternalPrimitiveTypeE code)
        {
            if (s_typeA == null)
            {
                InitTypeA();
            }
            return s_typeA[(int)code];
        }

Usage Example

示例#1
0
        private void ReadMemberPrimitiveUnTyped()
        {
            ObjectProgress objectProgress = (ObjectProgress)this.stack.Peek();

            if (this.memberPrimitiveUnTyped == null)
            {
                this.memberPrimitiveUnTyped = new MemberPrimitiveUnTyped();
            }
            this.memberPrimitiveUnTyped.Set((InternalPrimitiveTypeE)this.expectedTypeInformation);
            this.memberPrimitiveUnTyped.Read(this);
            this.memberPrimitiveUnTyped.Dump();
            this.prs.Init();
            this.prs.PRvarValue        = this.memberPrimitiveUnTyped.value;
            this.prs.PRdtTypeCode      = (InternalPrimitiveTypeE)this.expectedTypeInformation;
            this.prs.PRdtType          = Converter.ToType(this.prs.PRdtTypeCode);
            this.prs.PRparseTypeEnum   = InternalParseTypeE.Member;
            this.prs.PRmemberValueEnum = InternalMemberValueE.InlineValue;
            if (objectProgress.objectTypeEnum == InternalObjectTypeE.Object)
            {
                this.prs.PRmemberTypeEnum = InternalMemberTypeE.Field;
                this.prs.PRname           = objectProgress.name;
            }
            else
            {
                this.prs.PRmemberTypeEnum = InternalMemberTypeE.Item;
            }
            this.objectReader.Parse(this.prs);
        }
All Usage Examples Of System.Runtime.Serialization.Formatters.Binary.Converter::ToType