public void HasGenericType(IOrType <MethodType, Type, Method> parent, NameKey key, GenericTypeParameter type) { parent.Switch(x => x.Generics.Add(key, type), x => x.Generics.Add(key, type), x => x.Generics.Add(key, type)); }
public void HasOverlayedGeneric(IOrType <MethodType, Type, Method> parent, NameKey key, IOrType <MethodType, Type, Object, OrType, InferredType, GenericTypeParameter, IError> type) { parent.Switch(x => x.GenericOverlays.Add(key, type), x => x.GenericOverlays.Add(key, type), x => x.GenericOverlays.Add(key, type)); }
public static IOrType <T, IError> IfNotError <T>(this IOrType <T, IError> self, Action <T> transform) { self.Switch(x => transform(x), x => { }); return(self); }