internal UriRewriteActionProperties(UriRewriteActionType actionType, string sourcePattern, string destination, bool?preserveUnmatchedPath) { ActionType = actionType; SourcePattern = sourcePattern; Destination = destination; PreserveUnmatchedPath = preserveUnmatchedPath; }
internal UriRewriteActionDefinition(UriRewriteActionType typeDefinition, string sourcePattern, string destination, bool?preserveUnmatchedPath) { TypeDefinition = typeDefinition; SourcePattern = sourcePattern; Destination = destination; PreserveUnmatchedPath = preserveUnmatchedPath; }
public UriRewriteActionProperties(UriRewriteActionType actionType, string sourcePattern, string destination) { if (sourcePattern == null) { throw new ArgumentNullException(nameof(sourcePattern)); } if (destination == null) { throw new ArgumentNullException(nameof(destination)); } ActionType = actionType; SourcePattern = sourcePattern; Destination = destination; }
public UriRewriteActionDefinition(UriRewriteActionType typeDefinition, string sourcePattern, string destination) { if (sourcePattern == null) { throw new ArgumentNullException(nameof(sourcePattern)); } if (destination == null) { throw new ArgumentNullException(nameof(destination)); } TypeDefinition = typeDefinition; SourcePattern = sourcePattern; Destination = destination; }
internal static UriRewriteActionProperties DeserializeUriRewriteActionProperties(JsonElement element) { UriRewriteActionType typeName = default; string sourcePattern = default; string destination = default; Optional <bool> preserveUnmatchedPath = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("typeName")) { typeName = new UriRewriteActionType(property.Value.GetString()); continue; } if (property.NameEquals("sourcePattern")) { sourcePattern = property.Value.GetString(); continue; } if (property.NameEquals("destination")) { destination = property.Value.GetString(); continue; } if (property.NameEquals("preserveUnmatchedPath")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } preserveUnmatchedPath = property.Value.GetBoolean(); continue; } } return(new UriRewriteActionProperties(typeName, sourcePattern, destination, Optional.ToNullable(preserveUnmatchedPath))); }