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)); }
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)); }
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)); }
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)); }
public TemplateArg(string name, BSONElementType btype, object value) { Name = name; BSONType = btype; Value = value; }
public static BSONElement MakeOfType(BSONElementType bsonType, string name, object value) { var f = GetValueSet(bsonType); return(f(name, value)); }
public static BSONElement MakeOfType(BSONElementType bsonType, string name, object value) { var f = GetValueSet(bsonType); return f(name, value); }