Exemple #1
0
 public StartProjectionOrchestrationArgs(string projectionName,
                                         object projectionInput,
                                         OrchestrationCallbackIdentity callback)
     : this(projectionName, projectionInput)
 {
     this.CallbackIdentity = callback;
 }
 public StartIdentifierGroupOrchestrationArgs(string identifierGroupName,
                                              object identifierGroupInput,
                                              OrchestrationCallbackIdentity callback)
     : this(identifierGroupName, identifierGroupInput)
 {
     this.CallbackIdentity = callback;
 }
 public StartClassifierOrchestrationArgs(string classifierName,
                                         object classifierInput,
                                         OrchestrationCallbackIdentity callback)
     : this(classifierName, classifierInput)
 {
     this.CallbackIdentity = callback;
 }
 public static IdentifierGroupMemberResponse Create(DateTime?responseAsOfDate,
                                                    string memberIncluded,
                                                    OrchestrationCallbackIdentity responseSource = null)
 {
     return(new IdentifierGroupMemberResponse(responseAsOfDate,
                                              memberIncluded,
                                              responseSource));
 }
 public static QueryResponse Create(DateTime?responseAsOfDate,
                                    JObject responseResult,
                                    OrchestrationCallbackIdentity responseSource = null)
 {
     return(new QueryResponse(responseAsOfDate,
                              responseResult,
                              responseSource));
 }
 internal OrchestrationCalloutIdentity(OrchestrationCallbackIdentity source,
                                       OrchestrationCallbackIdentity target,
                                       string instance)
 {
     _sourceOrchestration = source;
     _targetOrchestration = target;
     _instanceIdentifier  = instance;
 }
Exemple #7
0
 public static ProjectionResponse Create(IProjectionUntyped projectionRun,
                                         OrchestrationCallbackIdentity responseSource = null)
 {
     return(new ProjectionResponse(projectionRun.CurrentAsOfDate,
                                   (int)projectionRun.CurrentSequenceNumber,
                                   GetValuesAsArray(projectionRun.CurrentValues),
                                   responseSource));
 }
 public static IdentifierGroupMembershipSnapshotResponse Create(DateTime?responseAsOfDate,
                                                                IEnumerable <string> membersIncluded,
                                                                OrchestrationCallbackIdentity responseSource = null)
 {
     return(new IdentifierGroupMembershipSnapshotResponse(responseAsOfDate,
                                                          membersIncluded,
                                                          responseSource));
 }
Exemple #9
0
 public StartProjectionOrchestrationArgs(string projectionName,
                                         object projectionInput,
                                         OrchestrationCallbackIdentity callback,
                                         DateTime?asOfDate)
     : this(projectionName,
            projectionInput,
            callback)
 {
     this.AsOfDate = asOfDate;
 }
 public StartClassifierOrchestrationArgs(string classifierName,
                                         object classifierInput,
                                         OrchestrationCallbackIdentity callback,
                                         DateTime?asOfDate)
     : this(classifierName,
            classifierInput,
            callback)
 {
     this.AsOfDate = asOfDate;
 }
 public StartIdentifierGroupOrchestrationArgs(string identifierGroupName,
                                              object identifierGroupInput,
                                              OrchestrationCallbackIdentity callback,
                                              DateTime?asOfDate)
     : this(identifierGroupName,
            identifierGroupInput,
            callback)
 {
     this.AsOfDate = asOfDate;
 }
 /// <summary>
 /// Create a standard classifier response to return back to whoever called the classifier
 /// </summary>
 /// <param name="responseAsOfDate">
 /// The effective date/time as of which this classification is valid
 /// </param>
 /// <param name="asOfSequence"></param>
 /// <param name="included"></param>
 /// <param name="responseSource"></param>
 /// <returns></returns>
 public static ClassifierResponse Create(DateTime?responseAsOfDate,
                                         int asOfSequence,
                                         bool included,
                                         OrchestrationCallbackIdentity responseSource = null)
 {
     return(new ClassifierResponse(responseAsOfDate,
                                   asOfSequence,
                                   included,
                                   responseSource));
 }
Exemple #13
0
 private CommandResponse(DateTime?responseAsOfDate,
                         OrchestrationCallbackIdentity responseSource = null)
 {
     if (responseAsOfDate.HasValue)
     {
         _asOfDate = responseAsOfDate;
     }
     else
     {
         _asOfDate = DateTime.UtcNow;
     }
     if (null != responseSource)
     {
         _responseSource = responseSource;
     }
 }
 protected internal EventStreamBackedProjectionOrchestrator(Guid uniqueIdentifier,
                                                            string projectionName,
                                                            OrchestrationCallbackIdentity calledBy = null)
 {
     if (uniqueIdentifier.Equals(Guid.Empty))
     {
         _uniqueIdentifier = Guid.NewGuid();
     }
     else
     {
         _uniqueIdentifier = uniqueIdentifier;
     }
     _projectionName = projectionName;
     if (null != calledBy)
     {
         base.CalledBy = calledBy;
     }
 }
 private QueryResponse(DateTime?responseAsOfDate,
                       JObject responseResult,
                       OrchestrationCallbackIdentity responseSource = null)
 {
     if (responseAsOfDate.HasValue)
     {
         _asOfDate = responseAsOfDate;
     }
     else
     {
         _asOfDate = DateTime.UtcNow;
     }
     _result = responseResult;
     if (null != responseSource)
     {
         _responseSource = responseSource;
     }
 }
 private IdentifierGroupMemberResponse(DateTime?responseAsOfDate,
                                       string memberIncluded,
                                       OrchestrationCallbackIdentity responseSource = null)
 {
     if (responseAsOfDate.HasValue)
     {
         _asOfDate = responseAsOfDate;
     }
     else
     {
         _asOfDate = DateTime.UtcNow;
     }
     _memberUniqueIdentifier = memberIncluded;
     if (null != responseSource)
     {
         _responseSource = responseSource;
     }
 }
Exemple #17
0
 protected internal EventStreamBackedQueryOrchestrator(Guid uniqueIdentifier,
                                                       string instanceName = null,
                                                       OrchestrationCallbackIdentity calledBy = null)
 {
     if (uniqueIdentifier.Equals(Guid.Empty))
     {
         _uniqueIdentifier = Guid.NewGuid();
     }
     else
     {
         _uniqueIdentifier = uniqueIdentifier;
     }
     _queryName = instanceName;
     if (null != calledBy)
     {
         base.CalledBy = calledBy;
     }
 }
Exemple #18
0
        /// <summary>
        /// Create a callback identity from a path
        /// </summary>
        /// <param name="callbackIdentityPath">
        /// Domain/Type/Name/Instance
        /// e.g.
        /// TheLongRun-Leagues/Command/Add-League/{1234-ABCD1-0A098A123E1F}
        /// </param>
        /// <remarks>
        /// Can be inclusive of or exclusive of the domain name - in the latter
        /// </remarks>
        public static OrchestrationCallbackIdentity CreateFromPath(string callbackIdentityPath)
        {
            if (string.IsNullOrWhiteSpace(callbackIdentityPath))
            {
                return(null);
            }

            string[] components = callbackIdentityPath.Split('/');
            string   _name      = string.Empty;
            OrchestrationClassifications _classification = OrchestrationClassifications.NotSet;
            Guid _identity = Guid.Empty;

            if (components.Length == 4)
            {
                _classification = ClassificationFromString(components[1]);
                _name           = components[2];
                Guid.TryParse(components[3], out _identity);
            }
            else
            {
                if (components.Length == 3)
                {
                    _classification = ClassificationFromString(components[0]);
                    _name           = components[1];
                    Guid.TryParse(components[2], out _identity);
                }
                else
                {
                    // Not a valid path
                    return(null);
                }
            }

            if (_classification == OrchestrationClassifications.NotSet)
            {
                return(null);
            }

            return(OrchestrationCallbackIdentity.Create(_classification,
                                                        _name,
                                                        _identity));
        }
 private ClassifierResponse(DateTime?responseAsOfDate,
                            int asOfSequence,
                            bool included,
                            OrchestrationCallbackIdentity responseSource = null)
 {
     if (responseAsOfDate.HasValue)
     {
         _asOfDate = responseAsOfDate;
     }
     else
     {
         _asOfDate = DateTime.UtcNow;
     }
     _asOfSequenceNumber = asOfSequence;
     _included           = included;
     if (null != responseSource)
     {
         _responseSource = responseSource;
     }
 }
 protected internal EventStreamBackedCommandOrchestrator(Guid uniqueIdentifier,
                                                         string instanceName,
                                                         OrchestrationCallbackIdentity calledBy = null)
 {
     if (uniqueIdentifier.Equals(Guid.Empty))
     {
         _uniqueIdentifier = Guid.NewGuid();
     }
     else
     {
         _uniqueIdentifier = uniqueIdentifier;
     }
     if (!string.IsNullOrWhiteSpace(instanceName))
     {
         _commandName = instanceName;
     }
     if (null != calledBy)
     {
         base.CalledBy = calledBy;
     }
 }
 private IdentifierGroupMembershipSnapshotResponse(DateTime?responseAsOfDate,
                                                   IEnumerable <string> membersIncluded,
                                                   OrchestrationCallbackIdentity responseSource = null)
 {
     if (responseAsOfDate.HasValue)
     {
         _asOfDate = responseAsOfDate;
     }
     else
     {
         _asOfDate = DateTime.UtcNow;
     }
     if (null != membersIncluded)
     {
         _members = new List <string>(membersIncluded);
     }
     if (null != responseSource)
     {
         _responseSource = responseSource;
     }
 }
Exemple #22
0
 private ProjectionResponse(DateTime?responseAsOfDate,
                            int asOfSequence,
                            JArray projectionValues,
                            OrchestrationCallbackIdentity responseSource = null)
 {
     if (responseAsOfDate.HasValue)
     {
         _asOfDate = responseAsOfDate;
     }
     else
     {
         _asOfDate = DateTime.UtcNow;
     }
     _asOfSequenceNumber = asOfSequence;
     if (null != projectionValues)
     {
         _values = projectionValues;
     }
     if (null != responseSource)
     {
         _responseSource = responseSource;
     }
 }
Exemple #23
0
 public CommandResponse Create(DateTime?responseAsOfDate,
                               OrchestrationCallbackIdentity responseSource = null)
 {
     return(new CommandResponse(responseAsOfDate,
                                responseSource));
 }