public bool CanHandle(IDelegateDescriptor descriptor) { if (descriptor is TDescriptor d) { return(CanHandle(d)); } return(false); }
public void AddDescriptor(IDelegateDescriptor descriptor) { if (descriptor == null) { throw new ArgumentNullException(nameof(descriptor)); } _descriptors.Add(descriptor); }
public string Generate( string delegateName, IDelegateDescriptor descriptor) { if (descriptor is TDescriptor d) { return(Generate(delegateName, d)); } throw new NotSupportedException("Descriptor not supported."); }