protected override void Cleanup() { ConsumedService.GetValueOrDefault()?.Dispose(); ConsumedService = default; DiscoveryMode = default; ContextLinkageOptions = default; }
public override int GetHashCode() { unchecked { return(((ConsumedService != null ? ConsumedService.GetHashCode() : 0) * 397) ^ (MethodId != null ? MethodId.GetHashCode() : 0)); } }
public override int GetHashCode() { unchecked { return((ConsumedService.GetHashCode() * 397) ^ (int)DiscoveryMode); } }
public override int GetHashCode() { unchecked { var hashCode = (ConsumedService != null ? ConsumedService.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ProvidedService != null ? ProvidedService.GetHashCode() : 0); hashCode = (hashCode * 397) ^ ServiceTitle.GetHashCode(); hashCode = (hashCode * 397) ^ (Methods != null ? Methods.GetHashCode() : 0); return(hashCode); } }
protected override void Cleanup() { ConsumedService?.Dispose(); ConsumedService = default; ProvidedService?.Dispose(); ProvidedService = default; foreach (var method in Methods) { method.Dispose(); } Methods.Clear(); ServiceTitle = string.Empty; }
protected override void Cleanup() { ConsumedService?.Dispose(); ConsumedService = default; ProvidedService?.Dispose(); ProvidedService = default; ServiceTitle = default; if (Methods != null) { foreach (var method in Methods) { method?.Dispose(); } } Methods = default; }
private static IConsumedService Convert( IApplication application, IService service, ConsumedServiceDto dto) { var cs = new ConsumedService { Alias = ConvertMaybe(dto.Alias), Service = service, Application = application, From = ConvertMatchPatterns(dto.From) }; cs.Methods = dto.Methods .Select(x => (IConsumedMethod) new ConsumedMethod { Method = service.Methods[x.Name], ConsumedService = cs }) .ToDictionary(x => x.Method.Name, x => x); return(cs); }
protected override void Cleanup() { ConsumedService?.Dispose(); ConsumedService = default; MethodId = default; }
protected override void Cleanup() { ConsumedService?.Dispose(); ConsumedService = default; DiscoveryMode = default; }
private bool Equals(ServiceDiscoveryRequest other) { return(ConsumedService.Equals(other.ConsumedService) && DiscoveryMode == other.DiscoveryMode); }