public CacheController(Uri serviceUri, string scopeName, OfflineSyncProvider localProvider) { if (serviceUri == null) { throw new ArgumentNullException("serviceUri"); } if (string.IsNullOrEmpty(scopeName)) { throw new ArgumentNullException("scopeName"); } if (!serviceUri.Scheme.Equals("http", StringComparison.InvariantCultureIgnoreCase) && !serviceUri.Scheme.Equals("https", StringComparison.InvariantCultureIgnoreCase)) { throw new ArgumentException("Uri must be http or https schema", "serviceUri"); } if (localProvider == null) { throw new ArgumentNullException("localProvider"); } this._serviceUri = serviceUri; this._localProvider = localProvider; this._controllerBehavior = new CacheControllerBehavior(); this._controllerBehavior.ScopeName = scopeName; }
object _lockObject = new object(); // Object used for locking access to the cancelled flag public CacheController(Uri serviceUri, string scopeName, OfflineSyncProvider localProvider) { if (serviceUri == null) { throw new ArgumentNullException("serviceUri"); } if (string.IsNullOrEmpty(scopeName)) { throw new ArgumentNullException("scopeName"); } if (!serviceUri.Scheme.Equals("http", StringComparison.InvariantCultureIgnoreCase) && !serviceUri.Scheme.Equals("https", StringComparison.InvariantCultureIgnoreCase)) { throw new ArgumentException("Uri must be http or https schema", "serviceUri"); } if (localProvider == null) { throw new ArgumentNullException("localProvider"); } this._serviceUri = serviceUri; this._localProvider = localProvider; this._controllerBehavior = new CacheControllerBehavior(); this._controllerBehavior.ScopeName = scopeName; }