Пример #1
0
    private static Func<string, object, BSONElement> GetValueSet(BSONElementType bsonType)
    {
      Func<string, object, BSONElement> result;
      if (s_ELEMENTVALUECTORS.TryGetValue(bsonType, out result)) return result; 

      throw new BSONException(StringConsts.BSON_TYPE_NOT_SUPORTED_ERROR.Args(bsonType));
    }
Пример #2
0
    public static Func<Stream, BSONElement> GetElementFactory(BSONElementType bsonType)
    {
      Func<Stream, BSONElement> result;
      if (s_ELEMENTSTREAMCTORS.TryGetValue(bsonType, out result)) return result; 

      throw new BSONException(StringConsts.BSON_TYPE_NOT_SUPORTED_ERROR.Args(bsonType));
    }
Пример #3
0
        private static Func <string, object, BSONElement> GetValueSet(BSONElementType bsonType)
        {
            Func <string, object, BSONElement> result;

            if (s_ELEMENTVALUECTORS.TryGetValue(bsonType, out result))
            {
                return(result);
            }

            throw new BSONException(StringConsts.BSON_TYPE_NOT_SUPORTED_ERROR.Args(bsonType));
        }
Пример #4
0
        public static Func <Stream, BSONElement> GetElementFactory(BSONElementType bsonType)
        {
            Func <Stream, BSONElement> result;

            if (s_ELEMENTSTREAMCTORS.TryGetValue(bsonType, out result))
            {
                return(result);
            }

            throw new BSONException(StringConsts.BSON_TYPE_NOT_SUPORTED_ERROR.Args(bsonType));
        }
Пример #5
0
 public TemplateArg(string name, BSONElementType btype, object value)
 {
     Name     = name;
     BSONType = btype;
     Value    = value;
 }
Пример #6
0
        public static BSONElement MakeOfType(BSONElementType bsonType, string name, object value)
        {
            var f = GetValueSet(bsonType);

            return(f(name, value));
        }
Пример #7
0
 public static BSONElement MakeOfType(BSONElementType bsonType, string name, object value)
 {
     var f = GetValueSet(bsonType);
       return f(name, value);
 }