/// <summary>
 /// Initializes a new instance of the <see cref="MongoPropertySetCollection"/> class.
 /// </summary>
 /// <param name="mongoCollection">The mongo collection.</param>
 /// <param name="schemaFactory">The schema set.</param>
 public MongoPropertySetCollection(MongoCollection<BsonDocument> mongoCollection,IPropertySchemaFactory schemaFactory)
 {
     _propertySchema = new MongoPropertySchemaSet(mongoCollection, schemaFactory);
     _mongoCollection = mongoCollection;
     _collectionName = _mongoCollection.Name;
     _storage=new MongoValueStorage(_mongoCollection,_propertySchema);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="JsonPropertySerializer"/> class.
 /// </summary>
 /// <param name="schemaFactory">The schema factory.</param>
 public JsonPropertySerializer(IPropertySchemaFactory schemaFactory)
 {
     _schemaFactory = schemaFactory;
     AssemblyResolver = n =>
                            {
                                _logger.Error(string.Format("Assembly resolver: Cannot resolve the assembly:{0}",n.FullName));
                                
                                return null;
                            };
     TypeResolver = (a, n, b) =>
                        {
                            _logger.Error(string.Format("Type resolver: Cannot resolve the type {0} in assembly {1}",n,a.FullName));
                            return null;
                        };
 }
示例#3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="JsonPropertySerializer"/> class.
        /// </summary>
        /// <param name="schemaFactory">The schema factory.</param>
        public JsonPropertySerializer(IPropertySchemaFactory schemaFactory)
        {
            _schemaFactory   = schemaFactory;
            AssemblyResolver = n =>
            {
                _logger.Error($"Assembly resolver: Cannot resolve the assembly:{n.FullName}");

                return(null);
            };
            TypeResolver = (a, n, b) =>
            {
                _logger.Error($"Type resolver: Cannot resolve the type {n} in assembly {a.FullName}");
                return(null);
            };
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="PropertySchemaSetBase"/> class.
 /// </summary>
 /// <param name="schemaFactory">The schema factory.</param>
 protected PropertySchemaSetBase(IPropertySchemaFactory schemaFactory)
 {
     SchemaFactory = schemaFactory;
 }
 public MockPropertySchemaSet(IPropertySchemaFactory schemaFactory) : base(schemaFactory)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="MongoPropertySetCollection"/> class.
 /// </summary>
 /// <param name="mongoDatabase">The mongo database.</param>
 /// <param name="collectionName">The collection name.</param>
 /// <param name="schemaFactory">The schema set.</param>
 public MongoPropertySetCollection(MongoDatabase mongoDatabase, 
     string collectionName,IPropertySchemaFactory schemaFactory)
     : this(GetCreateCollection(mongoDatabase,collectionName),schemaFactory)
 {
 }
 public MockPropertySchemaSet(IPropertySchemaFactory schemaFactory)
     : base(schemaFactory)
 {
 }