public OutputStreamResult(Func <Stream, CancellationToken, Task> action, string contentType, string fileDownloadName, KeyValueLogScope scope) { _contentType = contentType; _fileDownloadName = fileDownloadName; _action = action; _scope = scope; }
public static KeyValueLogScope CreateArtifactScope(string artifactType, IEndpointInfo endpointInfo) { KeyValueLogScope scope = new KeyValueLogScope(); scope.AddArtifactType(artifactType); scope.AddArtifactEndpointInfo(endpointInfo); return(scope); }
public static void AddArtifactEndpointInfo(this KeyValueLogScope scope, IEndpointInfo endpointInfo) { scope.Values.Add( ArtifactMetadataNames.ArtifactSource.ProcessId, endpointInfo.ProcessId.ToString(CultureInfo.InvariantCulture)); scope.Values.Add( ArtifactMetadataNames.ArtifactSource.RuntimeInstanceCookie, endpointInfo.RuntimeInstanceCookie.ToString("N")); }
public static void AddCollectionRuleEndpointInfo(this KeyValueLogScope scope, IEndpointInfo endpointInfo) { scope.Values.Add( "TargetProcessId", endpointInfo.ProcessId.ToString(CultureInfo.InvariantCulture)); scope.Values.Add( "TargetRuntimeInstanceCookie", endpointInfo.RuntimeInstanceCookie.ToString("N")); }
public static void AddArtifactType(this KeyValueLogScope scope, string artifactType) { scope.Values.Add("ArtifactType", artifactType); }
public static void AddCollectionRuleAction(this KeyValueLogScope scope, string actionType, int actionIndex) { scope.Values.Add("CollectionRuleActionType", actionType); scope.Values.Add("CollectionRuleActionIndex", actionIndex); }
public static void AddCollectionRuleTrigger(this KeyValueLogScope scope, string triggerType) { scope.Values.Add("CollectionRuleTriggerType", triggerType); }
public static void AddCollectionRuleName(this KeyValueLogScope scope, string ruleName) { scope.Values.Add("CollectionRuleName", ruleName); }
public EgressOperation(Func <Stream, CancellationToken, Task> action, string endpointName, string artifactName, IEndpointInfo source, string contentType, KeyValueLogScope scope) { _egress = (service, token) => service.EgressAsync(endpointName, action, artifactName, contentType, source, token); _egressProvider = endpointName; _scope = scope; }