public OperationDefinition(OperationPath path, IServiceMetadata meta) : base(meta) { ConsumesOctetStream = false; Path = path; Parameters = new List <ParameterDefinition>(); ProducesOctetStream = false; }
public OperationPath(string value, OperationPath toCopy) : base(NormalizePaths(value, toCopy), IsValid) { foreach (var kv in toCopy._pathParameters) { _pathParameters.Add(kv.Key, kv.Value); } }
public OperationPath(string value, OperationPath toCopy) : base(NormalizePaths(value, toCopy), IsValid) { foreach (var kv in toCopy._pathParameters) { _pathParameters.Add(kv.Key, kv.Value); } }
private static string NormalizePaths(string basePath, OperationPath toCopy) { var operationPath = toCopy.ToString(); if (basePath.EndsWith("/") && operationPath.StartsWith("/")) { operationPath = operationPath.Substring(1); } return basePath + operationPath; }
private static string NormalizePaths(string basePath, OperationPath toCopy) { var operationPath = toCopy.ToString(); if (basePath.EndsWith("/") && operationPath.StartsWith("/")) { operationPath = operationPath.Substring(1); } return(basePath + operationPath); }
public static bool TryParse(string candidate, out OperationPath operationPath) { operationPath = null; if (!IsValid(candidate)) { return(false); } operationPath = new OperationPath(candidate); return(true); }
public static bool TryParse(string candidate, out OperationPath operationPath) { operationPath = null; if (!IsValid(candidate)) { return false; } operationPath = new OperationPath(candidate); return true; }