protected InterceptedFunctionBase( InterceptedMethod method, IComputedRegistry computedRegistry) : base(computedRegistry) { Method = method; }
public ComputeServiceFunction( InterceptedMethod method, Generator <LTag> versionGenerator, ILogger <ComputeServiceFunction <T> >?log = null) : base(method) { Log = log ??= NullLogger <ComputeServiceFunction <T> > .Instance; VersionGenerator = versionGenerator; }
public ComputedServiceFunction( InterceptedMethod method, Generator <LTag> lTagGenerator, IComputedRegistry computedRegistry, ILogger <ComputedServiceFunction <T> >?log = null) : base(method, computedRegistry) { _log = log ??= NullLogger <ComputedServiceFunction <T> > .Instance; LTagGenerator = lTagGenerator; }
public ReplicaClientFunction( InterceptedMethod method, Generator <LTag> versionGenerator, IComputedRegistry computedRegistry, ILogger <ReplicaClientFunction <T> >?log = null) : base(method, computedRegistry) { Log = log ??= NullLogger <ReplicaClientFunction <T> > .Instance; IsLogDebugEnabled = Log.IsEnabled(LogLevel.Debug); VersionGenerator = versionGenerator; InvalidatedHandler = null; }
public ReplicaServiceFunction( InterceptedMethod method, Generator <LTag> lTagGenerator, IComputedRegistry computedRegistry, ILogger <ReplicaServiceFunction <T> >?log = null) : base(method, computedRegistry) { _log = log ??= NullLogger <ReplicaServiceFunction <T> > .Instance; _isLogDebugEnabled = _log.IsEnabled(LogLevel.Debug); LTagGenerator = lTagGenerator; InvalidatedHandler = null; }
public ReplicaClientFunction( InterceptedMethod method, IReplicator replicator, Generator <LTag> versionGenerator, ILogger <ReplicaClientFunction <T> >?log = null) : base(method, ((IReplicatorImpl)replicator).ServiceProvider) { Log = log ??= NullLogger <ReplicaClientFunction <T> > .Instance; IsLogDebugEnabled = Log.IsEnabled(LogLevel.Debug); VersionGenerator = versionGenerator; Replicator = replicator; }
public ComputeServiceFunction( InterceptedMethod method, Generator <LTag> versionGenerator, IServiceProvider serviceProvider, ILogger <ComputeServiceFunction <T> >?log = null) : base(method, versionGenerator, serviceProvider, log) { if (method.Options.IsAsyncComputed) { throw Errors.InternalError( $"This type can't be used with {nameof(ComputedOptions)}.{nameof(ComputedOptions.IsAsyncComputed)} == true option."); } }
public override IEnumerable <CustomParameterInfo> GetRequiredParameterLayout() { if (!InterceptedMethod.IsStatic) { yield return(InterceptedMethod.DeclaringType); } foreach (var el in InterceptedMethod.GetParameters()) { if (el.ParameterType.IsByRef) { yield return(el); } else { yield return(el.ParameterType.MakeByRefType()); } } }
public virtual IEnumerable <CustomParameterInfo> GetRequiredParameterLayout() { if (HasResultAsFirstParameter) { yield return((InterceptedMethod as MethodInfo).ReturnType); } if (!InterceptedMethod.IsStatic) { yield return(InterceptedMethod.DeclaringType); } foreach (var param in InterceptedMethod.GetParameters()) { yield return(param); } if (RequiresLocalToCacheOutResult) { yield return(new CustomParameterInfo((InterceptedMethod as MethodInfo).ReturnType, true)); } }
public void OnException(InterceptedMethod method, Exception ee) { string methodPath = string.Format("{0}.{1}", method.Target.GetType().ToString(), method.MethodName); this.exceptionFilter.Log(ee, methodPath, method.GenericTypes, method.ArgumentNames, method.ArgumentValues); }
public void BeginAround(InterceptedMethod method) { }
protected override InterceptedFunctionBase <T> CreateFunction <T>(InterceptedMethod method) { var log = LoggerFactory.CreateLogger <ComputedServiceFunction <T> >(); return(new ComputedServiceFunction <T>(method, LTagGenerator, Registry, log)); }
protected InterceptedFunctionBase(InterceptedMethod method) : base() { Method = method; }
protected override InterceptedFunctionBase <T> CreateFunction <T>(InterceptedMethod method) { var log = LoggerFactory.CreateLogger <ReplicaClientFunction <T> >(); return(new ReplicaClientFunction <T>(method, VersionGenerator, Registry, log)); }
public void PostProcess(InterceptedMethod method, object returnVal) { }
public bool PreProcess(InterceptedMethod method) { return true; }
protected InterceptedFunctionBase(InterceptedMethod method, IServiceProvider serviceProvider) : base(serviceProvider) { Method = method; Options = method.Options; }