public virtual void Initialize(IApplicationFolderProvider applicationFolderProvider)
        {
            if (applicationFolderProvider == null)
            {
                throw new ArgumentNullException(nameof(applicationFolderProvider));
            }

            this.folder = applicationFolderProvider.GetApplicationFolder();
        }
        public virtual void Initialize(IApplicationFolderProvider applicationFolderProvider)
        {
            if (applicationFolderProvider == null)
            {
                throw new ArgumentNullException("applicationFolderProvider");
            }

            this.folder = applicationFolderProvider.GetApplicationFolder();
        }
            public void InitializeCallsStorageInitialize()
            {
                IApplicationFolderProvider provider = null;
                var storage = new StubTransmissionStorage();

                storage.OnInitialize = _ => provider = _;

                Transmitter transmitter = CreateTransmitter(null, null, storage);

                transmitter.Initialize();

                Assert.NotNull(provider);
            }
        public TransmissionStorage(IApplicationFolderProvider applicationFolderProvider)
        {
            if (applicationFolderProvider == null)
            {
                throw new ArgumentNullException("applicationFolderProvider");
            }

            this.files          = new ConcurrentQueue <IPlatformFile>();
            this.loadFilesLock  = new object();
            this.sizeCalculated = false;

            this.folder = applicationFolderProvider.GetApplicationFolder();
        }
        public TransmissionStorage(IApplicationFolderProvider applicationFolderProvider)
        {
            if (applicationFolderProvider == null)
            {
                throw new ArgumentNullException("applicationFolderProvider");
            }

            this.files = new ConcurrentQueue<IPlatformFile>();
            this.loadFilesLock = new object();
            this.sizeCalculated = false;

            this.folder = applicationFolderProvider.GetApplicationFolder();
        }
Exemple #6
0
        public StubTransmissionStorage(IApplicationFolderProvider transmissionFolderProvider = null)
            : base(transmissionFolderProvider ?? new StubApplicationFolderProvider())
        {
            this.Queue     = new Queue <Transmission>();
            this.OnDequeue = () => this.Queue.Count == 0 ? null : this.Queue.Dequeue();
            this.OnEnqueue = transmission =>
            {
                if (transmission != null)
                {
                    this.Queue.Enqueue(transmission);
                    return(true);
                }

                return(false);
            };

            this.OnGetCapacity = () => this.capacity;
            this.OnSetCapacity = value => this.capacity = value;
        }
        public StubTransmissionStorage(IApplicationFolderProvider transmissionFolderProvider = null)
            : base(transmissionFolderProvider ?? new StubApplicationFolderProvider())
        {
            this.Queue = new Queue<Transmission>();
            this.OnDequeue = () => this.Queue.Count == 0 ? null : this.Queue.Dequeue();
            this.OnEnqueue = transmission =>
            {
                if (transmission != null)
                {
                    this.Queue.Enqueue(transmission);
                    return true;
                }

                return false;
            };

            this.OnGetCapacity = () => this.capacity;
            this.OnSetCapacity = value => this.capacity = value;
        }
 public override void Initialize(IApplicationFolderProvider transmissionFolderProvider = null)
 {
     this.OnInitialize(transmissionFolderProvider);
 }
 public override void Initialize(IApplicationFolderProvider transmissionFolderProvider = null)
 {
     this.OnInitialize(transmissionFolderProvider);
 }