/// <inheritdoc /> public IFileInfo GetFileInfo(string subpath) { if (!StartsWithBasePath(subpath, out var physicalPath)) { return(new NotFoundFileInfo(subpath)); } else { return(InnerProvider.GetFileInfo(physicalPath)); } }
/// <inheritdoc /> public IDirectoryContents GetDirectoryContents(string subpath) { if (!StartsWithBasePath(subpath, out var physicalPath)) { return(NotFoundDirectoryContents.Singleton); } else { return(InnerProvider.GetDirectoryContents(physicalPath)); } }
public override TResult Execute <TResult>(object sender, Func <TResult> function) { _depth.Value++; try { return(InnerProvider.Execute(sender, () => LogCalls(function))); } finally { _depth.Value--; } }
/// <inheritdoc /> public IFileInfo GetFileInfo(string subpath) { var modifiedSub = NormalizePath(subpath); if (!StartsWithBasePath(modifiedSub, out var physicalPath)) { return(new NotFoundFileInfo(subpath)); } else { return(InnerProvider.GetFileInfo(physicalPath.Value)); } }
public override async Task ExecuteAsync(object sender, Func <Task> function, CancellationToken cancellationToken = default) { _depth.Value++; try { await InnerProvider.ExecuteAsync(sender, () => LogCallsAsync(function), cancellationToken); } finally { _depth.Value--; } }
/// <summary> /// Gets a value that represents a hash of the IDs of a set of security rules. /// That is, if two users have equatable UserRuleSets then the same security rules apply to both. /// </summary> /// <param name="userId"> /// The ID of the user <see cref="UserAccount"/>. /// This cannot be negative. /// </param> /// <param name="permission"> /// The permission to get the query for. This cannot be null and should be one of <see cref="Permissions.Read"/>, /// <see cref="Permissions.Modify"/> or <see cref="Permissions.Delete"/>. /// </param> public UserRuleSet GetUserRuleSet(long userId, EntityRef permission) { // Validate if (userId <= 0) { throw new ArgumentNullException("userId"); } if (permission == null) { throw new ArgumentNullException("permission"); } if (permission.Id <= 0) { throw new ArgumentException("permission"); } // Create cache key CachingUserRuleSetProviderKey key = new CachingUserRuleSetProviderKey(userId, permission.Id); UserRuleSet result; Func <CachingUserRuleSetProviderKey, UserRuleSet> valueFactory = (k) => { UserRuleSet innerResult; using (CacheContext cacheContext = new CacheContext()) { innerResult = InnerProvider.GetUserRuleSet(k.SubjectId, k.PermissionId); // Add the cache context entries to the appropriate CacheInvalidator _cacheInvalidator.AddInvalidations(cacheContext, key); } return(innerResult); }; // Check cache if (Cache.TryGetOrAdd(key, out result, valueFactory) && CacheContext.IsSet()) { // Add the already stored changes that should invalidate this cache // entry to any outer or containing cache contexts. using (CacheContext cacheContext = CacheContext.GetContext( )) { cacheContext.AddInvalidationsFor(_cacheInvalidator, key); } } return(result); }
/// <inheritdoc /> public IDirectoryContents GetDirectoryContents(string subpath) { var modifiedSub = NormalizePath(subpath); if (StartsWithBasePath(modifiedSub, out var physicalPath)) { return(InnerProvider.GetDirectoryContents(physicalPath.Value)); } else if (string.Equals(subpath, string.Empty) || string.Equals(modifiedSub, "/")) { return(new StaticWebAssetsDirectoryRoot(BasePath)); } else if (BasePath.StartsWithSegments(modifiedSub, FilePathComparison, out var remaining)) { return(new StaticWebAssetsDirectoryRoot(remaining)); } return(NotFoundDirectoryContents.Singleton); }
public IExtents GetExtents() { return(InnerProvider.GetExtents()); }
/// <inheritdoc /> public IChangeToken Watch(string filter) { return(InnerProvider.Watch(filter)); }
public IEnumerator <T> GetEnumerator() { // Create the new query and return the enumerator return(InnerProvider.CreateQuery <T>(InnerExpression).GetEnumerator()); }
///<summary> /// 키 및 culture에 대한 리소스 개체를 반환합니다. ///</summary> ///<returns> ///<paramref name="resourceKey" /> 및 <paramref name="culture" />에 대한 리소스 값을 포함하는 <see cref="T:System.Object" />입니다. ///</returns> ///<param name="resourceKey"> /// 특정 리소스를 식별하는 키입니다. /// </param> ///<param name="culture"> /// 리소스의 지역화된 값을 식별하는 culture입니다. ///</param> /// <returns>resource value, if not exists, return null</returns> public virtual object GetObject(string resourceKey, CultureInfo culture) { return(InnerProvider.GetObject(resourceKey, culture)); }
/// <summary> /// Assigns height settings to a portion of the _matrix. /// </summary> /// <param name="matrix">The matrix to update.</param> /// <param name="bounds">The portion of the matrix to update.</param> /// <returns> /// An enumerator which once enumerated will do the update. /// </returns> public override IEnumerator AssignHeightSettings(CellMatrix matrix, MatrixBounds bounds) { var inner = new InnerProvider(matrix); return(inner.AssignHeightSettings(bounds)); }
public Object ExecuteQuery(Expression query) { return(InnerProvider.ExecuteQuery(query)); }
public void Dispose() { InnerProvider.Dispose(); }
public object Execute(Expression expression) { return(InnerProvider.Execute(GetInnerExpression(expression))); }
public void Close() { InnerProvider.Close(); }
public FeatureDataTable CreateNewTable() { return(InnerProvider.CreateNewTable()); }
public void SetTableSchema(FeatureDataTable table) { InnerProvider.SetTableSchema(table); }
public DataTable GetSchemaTable() { return(InnerProvider.GetSchemaTable()); }
public Int32 GetFeatureCount() { return(InnerProvider.GetFeatureCount()); }
public IFeatureDataReader ExecuteFeatureQuery(FeatureQueryExpression query, FeatureQueryExecutionOptions options) { return(new MonitoringFeatureDataReader(InnerProvider.ExecuteFeatureQuery(query, options), Monitor)); }
public void Open() { InnerProvider.Open(); }
public TResult Execute <TResult>(Expression expression) { return(InnerProvider.Execute <TResult>(GetInnerExpression(expression))); }