private string GetClassName([NotNull] ExtensionsGenerationOptions typeExtensionsGenerationOptions) { var sanitizedClassName = string.IsNullOrWhiteSpace(typeExtensionsGenerationOptions.ExtensionsClassCustomName) ? typeExtensionsGenerationOptions.ClassName.WithoutNamespace().WithoutGenericPart() : typeExtensionsGenerationOptions.ExtensionsClassCustomName.WithoutNamespace().WithoutGenericPart(); return($"{sanitizedClassName}WeakEventSubscriptionExtensions"); }
private string GetWeakSubscribeMethodName( [NotNull] ExtensionsGenerationOptions typeExtensionsGenerationOptions, [NotNull] EventGenerationOptions typeEventGenerationOptions) { return(string.IsNullOrWhiteSpace(typeExtensionsGenerationOptions.ExtensionsMethodsGenericTypeParameters) ? $"{typeEventGenerationOptions.EventName}WeakSubscribe" : $"{typeEventGenerationOptions.EventName}WeakSubscribe<{typeExtensionsGenerationOptions.ExtensionsMethodsGenericTypeParameters}>"); }
private string GetNamespace([NotNull] ExtensionsGenerationOptions typeExtensionsGenerationOptions) { return(string.IsNullOrEmpty(typeExtensionsGenerationOptions.TargetNamespace) ? TargetNamespace : typeExtensionsGenerationOptions.TargetNamespace); }