public static PSSecurityAllowedConnection ConvertToPSType(this AllowedConnectionsResource value) { return(new PSSecurityAllowedConnection() { Id = value.Id, Name = value.Name, Type = value.Type, CalculatedDateTime = value.CalculatedDateTime, ConnectableResources = value.ConnectableResources.ConvertToPSType() }); }
private void ValidateAllowedConnectionsResource(AllowedConnectionsResource allowedConnectionsResource) { Assert.NotNull(allowedConnectionsResource); Assert.NotNull(allowedConnectionsResource.CalculatedDateTime); allowedConnectionsResource.ConnectableResources?.ForEach(connectableResource => { Assert.NotNull(connectableResource.Id); Assert.NotNull(connectableResource.InboundConnectedResources); Assert.NotNull(connectableResource.OutboundConnectedResources); }); }