예제 #1
0
        // ================

        public OperationContext(
            CancellationToken cancellationToken = default(CancellationToken),
            TimeSpan?timeout = null,
            [CallerMemberName] string memberName = null,
            [CallerFilePath] string filePath     = null,
            [CallerLineNumber] int lineNumber    = 0
            )
        {
            CancellationToken = cancellationToken;
            _values           = OperationValueDictionary.Empty;
            _created          = _tick.Elapsed;
            _timeout          = timeout ?? TimeSpan.FromMinutes(5); // Azure function default timeout
            _location         = new OperationLocation(memberName, filePath, lineNumber);
        }
예제 #2
0
 private OperationContext(
     OperationContext parent,
     CancellationToken cancellationToken,
     OperationValueDictionary values,
     TimeSpan created,
     TimeSpan timeout,
     OperationLocation location
     )
 {
     _parent           = parent;
     CancellationToken = cancellationToken;
     _values           = values;
     _created          = created;
     _timeout          = timeout;
     _location         = location;
 }