コード例 #1
0
ファイル: PrimitiveType.cs プロジェクト: nickchal/pash
 private PrimitiveType(Type clrType, string edmTypeName, EdmPrimitiveTypeKind primitiveKind, PrimitiveTypeConverter typeConverter, bool hasReverseMapping)
 {
     this.ClrType = clrType;
     this.EdmTypeName = edmTypeName;
     this.primitiveKind = primitiveKind;
     this.TypeConverter = typeConverter;
     this.HasReverseMapping = hasReverseMapping;
 }
コード例 #2
0
ファイル: PrimitiveType.cs プロジェクト: modulexcite/pash-1
 private PrimitiveType(Type clrType, string edmTypeName, EdmPrimitiveTypeKind primitiveKind, PrimitiveTypeConverter typeConverter, bool hasReverseMapping)
 {
     this.ClrType           = clrType;
     this.EdmTypeName       = edmTypeName;
     this.primitiveKind     = primitiveKind;
     this.TypeConverter     = typeConverter;
     this.HasReverseMapping = hasReverseMapping;
 }
コード例 #3
0
ファイル: PrimitiveType.cs プロジェクト: modulexcite/pash-1
        internal static void RegisterKnownType(Type clrType, string edmTypeName, EdmPrimitiveTypeKind primitiveKind, PrimitiveTypeConverter converter, bool twoWay)
        {
            PrimitiveType type = new PrimitiveType(clrType, edmTypeName, primitiveKind, converter, twoWay);

            clrMapping.Add(clrType, type);
            if (twoWay)
            {
                edmMapping.Add(edmTypeName, type);
            }
        }
コード例 #4
0
ファイル: PrimitiveType.cs プロジェクト: tapika/swupd
        /// <summary>
        /// Register a known type as primitive type
        /// </summary>
        /// <param name="clrType">The Clr Type</param>
        /// <param name="edmTypeName">The Edm Type Name</param>
        /// <param name="primitiveKind">The Edm Primitive Type Kind</param>
        /// <param name="converter">The Type Converter</param>
        /// <param name="twoWay">Whether this mapping should have a reverse mapping from Edm</param>
        /// <remarks>
        /// This method is internal only for testing purposes.
        /// IN PRODUCT MUST BE CALLED ONLY FROM THE STATIC CTOR OF THE PrimitiveType CLASS.
        /// </remarks>
        internal static void RegisterKnownType(Type clrType, string edmTypeName, EdmPrimitiveTypeKind primitiveKind, PrimitiveTypeConverter converter, bool twoWay)
        {
            Debug.Assert(!clrMapping.ContainsKey(clrType), "Clr type already registered");
            Debug.Assert(clrType != null, "clrType != null");
            Debug.Assert(primitiveKind != EdmPrimitiveTypeKind.None, "primitiveKind != EdmPrimitiveTypeKind.None");
            Debug.Assert(converter != null, "converter != null");

            PrimitiveType pt = new PrimitiveType(clrType, edmTypeName, primitiveKind, converter, twoWay);

            clrMapping.Add(clrType, pt);

            if (twoWay)
            {
                Debug.Assert(!edmMapping.ContainsKey(edmTypeName), "Edm type name already registered");
                edmMapping.Add(edmTypeName, pt);
            }
        }
コード例 #5
0
ファイル: PrimitiveType.cs プロジェクト: tapika/swupd
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="clrType">The Clr Type</param>
        /// <param name="edmTypeName">The Edm Type Name</param>
        /// <param name="primitiveKind">The Edm Primitive Type Kind</param>
        /// <param name="typeConverter">A PrimitiveXmlConverter that provides convertion between  instances of this type to its Xml representation and back</param>
        /// <param name="hasReverseMapping">Whether this primitive type can be mapped from the Edm type name</param>
        private PrimitiveType(Type clrType, string edmTypeName, EdmPrimitiveTypeKind primitiveKind, PrimitiveTypeConverter typeConverter, bool hasReverseMapping)
        {
            Debug.Assert(clrType != null, "clrType != null");
            Debug.Assert(primitiveKind != EdmPrimitiveTypeKind.None, "primitiveKind != EdmPrimitiveTypeKind.None");
            Debug.Assert(typeConverter != null, "typeConverter != null");

            this.ClrType           = clrType;
            this.EdmTypeName       = edmTypeName;
            this.PrimitiveKind     = primitiveKind;
            this.TypeConverter     = typeConverter;
            this.HasReverseMapping = hasReverseMapping;
        }
コード例 #6
0
ファイル: PrimitiveType.cs プロジェクト: nickchal/pash
 internal static void RegisterKnownType(Type clrType, string edmTypeName, EdmPrimitiveTypeKind primitiveKind, PrimitiveTypeConverter converter, bool twoWay)
 {
     PrimitiveType type = new PrimitiveType(clrType, edmTypeName, primitiveKind, converter, twoWay);
     clrMapping.Add(clrType, type);
     if (twoWay)
     {
         edmMapping.Add(edmTypeName, type);
     }
 }