Exemplo n.º 1
0
 public OutputStreamResult(Func <Stream, CancellationToken, Task> action, string contentType, string fileDownloadName, KeyValueLogScope scope)
 {
     _contentType      = contentType;
     _fileDownloadName = fileDownloadName;
     _action           = action;
     _scope            = scope;
 }
Exemplo n.º 2
0
        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"));
 }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 6
0
 public static void AddCollectionRuleAction(this KeyValueLogScope scope, string actionType, int actionIndex)
 {
     scope.Values.Add("CollectionRuleActionType", actionType);
     scope.Values.Add("CollectionRuleActionIndex", actionIndex);
 }
Exemplo n.º 7
0
 public static void AddCollectionRuleTrigger(this KeyValueLogScope scope, string triggerType)
 {
     scope.Values.Add("CollectionRuleTriggerType", triggerType);
 }
Exemplo n.º 8
0
 public static void AddCollectionRuleName(this KeyValueLogScope scope, string ruleName)
 {
     scope.Values.Add("CollectionRuleName", ruleName);
 }
Exemplo n.º 9
0
 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;
 }