/// <summary>
 ///     Initializes a new instance of the <see cref="Repository" /> class.
 /// </summary>
 /// <param name="adaptor">The adaptor.</param>
 /// <exception cref="System.ArgumentNullException">adaptor</exception>
 public Repository(IDataAdaptor adaptor)
 {
     if (adaptor == null)
     {
         throw new ArgumentNullException("adaptor");
     }
     this.adaptor = adaptor;
 }
Ejemplo n.º 2
0
 public BaseAdaptor(Type type, object parentComponent, DataManager DataManagerInstance)
 {
     ParentComponent          = parentComponent;
     this.DataManagerInstance = DataManagerInstance;
     if (type != null)
     {
         Instance = (IDataAdaptor)DataManagerInstance.ServiceProvider.GetService(type);
         Instance = Instance == null ? (IDataAdaptor)Activator.CreateInstance(type) : Instance;
         Instance.SetParent(parentComponent as BaseComponent);
     }
     GenericType = ParentComponent.GetType();
     if (GenericType.IsGenericType && GenericType.GetGenericArguments().Length != 0)
     {
         GenericType = GenericType.GetGenericArguments()[0];
     }
     else
     {
         GenericType = null;
     }
 }
Ejemplo n.º 3
0
 public VideosController(IDataAdaptor <VideoModel> dataAdaptor)
 {
     _dataAdaptor = dataAdaptor;
 }
Ejemplo n.º 4
0
 public BaseDocumentManager(IDataAdaptor <TReader, TWriter> adaptor)
 {
     this._adaptor = adaptor;
 }