예제 #1
0
 public bool Equals(DestinationTypeEnum obj)
 {
     if ((object)obj == null)
     {
         return(false);
     }
     return(StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value));
 }
예제 #2
0
 public void AddRule(string pattern, DestinationTypeEnum destinationType, SourceTypeEnum sourceType, params object[] parameters)
 {
     addRuleParameters.Add(
         new AddRuleParameters
     {
         Pattern         = pattern,
         DestinationType = destinationType,
         SourceType      = sourceType,
         Parameters      = parameters
     });
 }
예제 #3
0
 public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader)
 {
     System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader));
     this.fieldpad            = binaryReader.ReadBytes(64);
     this.DestinationType     = ((DestinationTypeEnum)(binaryReader.ReadInt16()));
     this.Destination         = ((DestinationEnum)(binaryReader.ReadInt16()));
     this.Source              = ((SourceEnum)(binaryReader.ReadInt16()));
     this.fieldpad0           = binaryReader.ReadBytes(2);
     this.InBounds            = binaryReader.ReadRange();
     this.OutBounds           = binaryReader.ReadRange();
     this.fieldpad1           = binaryReader.ReadBytes(64);
     this.TintColorLowerBound = binaryReader.ReadColorR8G8B8();
     this.TintColorUpperBound = binaryReader.ReadColorR8G8B8();
     this.PeriodicFunction    = ((PeriodicFunctionEnum)(binaryReader.ReadInt16()));
     this.fieldpad2           = binaryReader.ReadBytes(2);
     this.FunctionPeriod      = binaryReader.ReadSingle();
     this.FunctionPhase       = binaryReader.ReadSingle();
     this.fieldpad3           = binaryReader.ReadBytes(32);
     return(pointerQueue);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ConnectionEntity" /> class.
 /// </summary>
 /// <param name="revision">The revision for this request/response. The revision is required for any mutable flow requests and is included in all responses..</param>
 /// <param name="id">The id of the component..</param>
 /// <param name="uri">The URI for futures requests to the component..</param>
 /// <param name="position">The position of this component in the UI if applicable..</param>
 /// <param name="permissions">The permissions for this component..</param>
 /// <param name="bulletins">The bulletins for this component..</param>
 /// <param name="disconnectedNodeAcknowledged">Acknowledges that this node is disconnected to allow for mutable requests to proceed..</param>
 /// <param name="component">component.</param>
 /// <param name="status">The status of the connection..</param>
 /// <param name="bends">The bend points on the connection..</param>
 /// <param name="labelIndex">The index of the bend point where to place the connection label..</param>
 /// <param name="getzIndex">The z index of the connection..</param>
 /// <param name="sourceId">The identifier of the source of this connection..</param>
 /// <param name="sourceGroupId">The identifier of the group of the source of this connection..</param>
 /// <param name="sourceType">The type of component the source connectable is. (required).</param>
 /// <param name="destinationId">The identifier of the destination of this connection..</param>
 /// <param name="destinationGroupId">The identifier of the group of the destination of this connection..</param>
 /// <param name="destinationType">The type of component the destination connectable is. (required).</param>
 public ConnectionEntity(RevisionDTO revision = default(RevisionDTO), string id = default(string), string uri = default(string), PositionDTO position = default(PositionDTO), PermissionsDTO permissions = default(PermissionsDTO), List <BulletinEntity> bulletins = default(List <BulletinEntity>), bool?disconnectedNodeAcknowledged = default(bool?), ConnectionDTO component = default(ConnectionDTO), ConnectionStatusDTO status = default(ConnectionStatusDTO), List <PositionDTO> bends = default(List <PositionDTO>), int?labelIndex = default(int?), long?getzIndex = default(long?), string sourceId = default(string), string sourceGroupId = default(string), SourceTypeEnum sourceType = default(SourceTypeEnum), string destinationId = default(string), string destinationGroupId = default(string), DestinationTypeEnum destinationType = default(DestinationTypeEnum))
 {
     // to ensure "sourceType" is required (not null)
     if (sourceType == null)
     {
         throw new InvalidDataException("sourceType is a required property for ConnectionEntity and cannot be null");
     }
     else
     {
         this.SourceType = sourceType;
     }
     // to ensure "destinationType" is required (not null)
     if (destinationType == null)
     {
         throw new InvalidDataException("destinationType is a required property for ConnectionEntity and cannot be null");
     }
     else
     {
         this.DestinationType = destinationType;
     }
     this.Revision    = revision;
     this.Id          = id;
     this.Uri         = uri;
     this.Position    = position;
     this.Permissions = permissions;
     this.Bulletins   = bulletins;
     this.DisconnectedNodeAcknowledged = disconnectedNodeAcknowledged;
     this.Component          = component;
     this.Status             = status;
     this.Bends              = bends;
     this.LabelIndex         = labelIndex;
     this.GetzIndex          = getzIndex;
     this.SourceId           = sourceId;
     this.SourceGroupId      = sourceGroupId;
     this.DestinationId      = destinationId;
     this.DestinationGroupId = destinationGroupId;
 }
예제 #5
0
 private async Task <Guid> CreateRuleAsync(Guid groupId, int index, string pattern, SourceTypeEnum sourceType, DestinationTypeEnum destinationType = DestinationTypeEnum.Any)
 {
     return(await rules.CreatAsync(groupId, index, pattern, sourceType, destinationType));
 }
예제 #6
0
        public async Task <Guid> CreatAsync(Guid groupId, int index, string pattern, SourceTypeEnum sourceType, DestinationTypeEnum destinationType = DestinationTypeEnum.Any)
        {
            CreateRuleRequest request = new CreateRuleRequest
            {
                Index           = index,
                Pattern         = pattern,
                SourceType      = sourceType,
                DestinationType = destinationType,
                GroupId         = groupId
            };
            HttpResponseMessage response = await client.PostAsJsonAsync(
                controllerPath, request);

            if (response.IsSuccessStatusCode)
            {
                CreateRuleResponse rule = await response.Content.ReadAsAsync <CreateRuleResponse>();

                return(rule.Id);
            }
            else
            {
                throw new UnauthorizedAccessException($"Unauthorized rule creation at index '{index}' for group '{groupId}'");
            }
        }
예제 #7
0
 public rule(DestinationTypeEnum dest_type, string destination_link)
 {
     this.dest_type        = dest_type;
     this.destination_link = destination_link;
 }