Exemplo n.º 1
0
 public static ISyncFactory ResolveISyncFactory()
 {
     if (syncFactory == null)
     {
         syncFactory = new SyncFactory();
     }
     return(syncFactory);
 }
Exemplo n.º 2
0
 public DirectorySync(string directoryPath, ISyncFactory factory, IFileSystem fileSystem,
     IDirectoryValidator validator, IProjectFactory projectFactory)
 {
     var files = fileSystem.GetFiles(directoryPath, "*.csproj", SearchOption.AllDirectories);
     foreach (var file in files)
     {
         if (validator.IsDirectoryValid(file) && projectFactory.IsValidProject(file))
         {
             var project = factory.CreateProjectSynchronizer(file);
             _projects.Add(project);
         }
     }
 }
Exemplo n.º 3
0
 public SyncPartnership(IDevice device, ISyncFactory factory)
 {
     if (factory == null)
     {
         throw new ArgumentNullException(typeof(ISyncFactory).ToString());
     }
     this.factory = factory;
     this.sourceContentLoadingListener = new EventHandler<ContentLoadingEventArgs>(this.OnContentLoading);
     this.Device = device;
     this.reloadSourcesTimer = new BatchingTimer(new Action(this.LoadSourceContent), 0x3e8);
     this.InitPartnership();
     this.attemptedSyncOperations = new List<SyncOperation>();
     this.successfulSyncOperations = new List<SyncOperation>();
     this.successfulCumulativeSyncOperations = new List<SyncOperation>();
     this.successfulAcquiredOperations = new List<SyncOperation>();
 }
Exemplo n.º 4
0
 public SyncPartnership(IDevice device, ISyncFactory factory)
 {
     if (factory == null)
     {
         throw new ArgumentNullException(typeof(ISyncFactory).ToString());
     }
     this.factory = factory;
     this.sourceContentLoadingListener = new EventHandler <ContentLoadingEventArgs>(this.OnContentLoading);
     this.Device             = device;
     this.reloadSourcesTimer = new BatchingTimer(new Action(this.LoadSourceContent), 0x3e8);
     this.InitPartnership();
     this.attemptedSyncOperations            = new List <SyncOperation>();
     this.successfulSyncOperations           = new List <SyncOperation>();
     this.successfulCumulativeSyncOperations = new List <SyncOperation>();
     this.successfulAcquiredOperations       = new List <SyncOperation>();
 }
Exemplo n.º 5
0
 /// <summary>
 /// Creates a new instance of a Startup class, initializes it with the specified arguments.
 /// </summary>
 /// <param name="realmFactory"></param>
 /// <param name="syncFactory"></param>
 /// <param name="logger"></param>
 public Startup(IRealmFactory realmFactory, ISyncFactory syncFactory, ILogger <Startup> logger)
 {
     _realmFactory = realmFactory;
     _syncFactory  = syncFactory;
     _logger       = logger;
 }
Exemplo n.º 6
0
 public static ISyncFactory ResolveISyncFactory()
 {
     if (syncFactory == null)
     {
         syncFactory = new SyncFactory();
     }
     return syncFactory;
 }