public FSharpAsync <ConnectionAction> OnConnectionBeforeHandler( IDiResolveReleaseOnlyContainer di, string url, object serviceInstanceOrNull, MethodInfo methodOrNull, object[] parms, ResourceType res) { var ci = di.Resolve <ClientConnectionInfo>(); var guid = Guid.NewGuid().ToString(); LogAsReply($"OnConnectionBeforeHandler() ip={ci.ClientIpAddress} guid={guid} url={url} resourceType={res.ToString()} serviceImpl={serviceInstanceOrNull} method={methodOrNull} parms={parms}"); var ctx = new FilterInvocation { Url = url, ResType = res, InvType = FilterInvocationType.BeforeConnection, FullInterfaceNameOrNull = serviceInstanceOrNull == null ? null : FindServiceInterfaceType(serviceInstanceOrNull).FullName, MethodNameOrNull = methodOrNull?.Name, Guid = guid }; SendFilterInvocation(ctx); return(FSharpAsyncUtil.FromResult(ConnectionAction.CreateNonFiltered(ctx))); }
public FSharpAsync <ConnectionAction> OnConnectionBeforeHandler( IDiResolveReleaseOnlyContainer di, string url, object serviceInstance, MethodInfo method, object[] prms, ResourceType res) { var ci = di.Resolve <ClientConnectionInfo>(); var guid = Guid.NewGuid().ToString(); Logger.Debug(typeof(LifeTimeFilter), $"OnConnectionBeforeHandler() ip={ci.ClientIpAddress} guid={guid} url={url} resourceType={res.ToString()} serviceImpl={serviceInstance} method={method} prms={prms}"); return(FSharpAsyncUtil.FromResult(ConnectionAction.CreateNonFiltered(guid))); }
public FSharpAsync <Microsoft.FSharp.Core.Unit> OnConnectionAfterHandler( object rawConnCtx, IDiResolveReleaseOnlyContainer di, Exception exOrNull) { var connCtx = (FilterInvocation)rawConnCtx; LogAsReply($"OnConnectionAfterServiceHandler() guid={connCtx.Guid} success?={exOrNull == null} errorDetails={exOrNull}"); connCtx.InvType = FilterInvocationType.AfterConnection; SendFilterInvocation(connCtx); return(FSharpAsyncUtil.FromUnitResult()); }
public FSharpAsync <Microsoft.FSharp.Core.Unit> OnConnectionAfterHandler(object connCtx, IDiResolveReleaseOnlyContainer obj0, Exception exOrNull) { Logger.Debug(typeof(LifeTimeFilter), $"OnConnectionAfterServiceHandler() guid={connCtx} success?={exOrNull == null} errorDetails={exOrNull}"); return(FSharpAsyncUtil.FromUnitResult()); }