Beispiel #1
0
 private static IEnumerable <EtpUri> ConstructAlternateUris(MockObject @object, EtpVersion version)
 {
     if (@object.Parents.Count == 0 && @object.Containers.Count == 0)
     {
         yield return(@object.Uri(version));
     }
     else
     {
         if (@object.Parents.Count != 0)
         {
             foreach (var parent in @object.Parents.Values)
             {
                 foreach (var uri in ConstructAlternateUris(parent, version))
                 {
                     yield return(uri.Append(@object.DataObjectType, objectId: @object.Uuid.ToString()));
                 }
             }
         }
         if (@object.Containers.Count != 0)
         {
             foreach (var container in @object.Containers.Values)
             {
                 foreach (var uri in ConstructAlternateUris(container, version))
                 {
                     yield return(uri.Append(@object.DataObjectType, objectId: @object.Uuid.ToString()));
                 }
             }
         }
     }
 }
Beispiel #2
0
 public MockSubscriptionInfo(EtpVersion version, MockObject mockObject, Guid requestUuid)
 {
     RequestUuid       = requestUuid;
     IncludeObjectData = true;
     Context           = new MockGraphContext(mockObject.Uri(version));
 }