43 references to TypeKindOptions
Microsoft.CodeAnalysis.Features (43)
GenerateType\AbstractGenerateTypeService.CodeAction.cs (19)
106var typeKindValue = GetTypeKindOption(_state); 120private TypeKindOptions GetTypeKindOption(State state) 122var gotPreassignedTypeOptions = GetPredefinedTypeKindOption(state, out var typeKindValue); 125typeKindValue = state.IsSimpleNameGeneric ? TypeKindOptionsHelper.RemoveOptions(typeKindValue, TypeKindOptions.GenericInCompatibleTypes) : typeKindValue; 126typeKindValue = state.IsMembersWithModule ? TypeKindOptionsHelper.AddOption(typeKindValue, TypeKindOptions.Module) : typeKindValue; 127typeKindValue = state.IsInterfaceOrEnumNotAllowedInTypeContext ? TypeKindOptionsHelper.RemoveOptions(typeKindValue, TypeKindOptions.Interface, TypeKindOptions.Enum) : typeKindValue; 128typeKindValue = state.IsDelegateAllowed ? typeKindValue : TypeKindOptionsHelper.RemoveOptions(typeKindValue, TypeKindOptions.Delegate); 129typeKindValue = state.IsEnumNotAllowed ? TypeKindOptionsHelper.RemoveOptions(typeKindValue, TypeKindOptions.Enum) : typeKindValue; 135private bool GetPredefinedTypeKindOption(State state, out TypeKindOptions typeKindValueFinal) 139typeKindValueFinal = TypeKindOptions.Attribute; 143if (_service.TryGetBaseList(state.NameOrMemberAccessExpression, out var typeKindValue)) 151typeKindValueFinal = TypeKindOptions.BaseList; 157typeKindValueFinal = TypeKindOptions.Delegate; 163typeKindValueFinal = state.IsSimpleNameGeneric ? TypeKindOptionsHelper.RemoveOptions(TypeKindOptions.MemberAccessWithNamespace, TypeKindOptions.GenericInCompatibleTypes) : TypeKindOptions.MemberAccessWithNamespace; 164typeKindValueFinal = state.IsEnumNotAllowed ? TypeKindOptionsHelper.RemoveOptions(typeKindValueFinal, TypeKindOptions.Enum) : typeKindValueFinal; 168typeKindValueFinal = TypeKindOptions.AllOptions;
GenerateType\AbstractGenerateTypeService.cs (1)
53internal abstract bool TryGetBaseList(TExpressionSyntax expression, out TypeKindOptions returnValue);
GenerateType\GenerateTypeDialogOptions.cs (3)
11TypeKindOptions typeKindOptions = TypeKindOptions.AllOptions, 15public TypeKindOptions TypeKindOptions { get; } = typeKindOptions;
GenerateType\TypeKindOptions.cs (20)
43public static bool IsClass(TypeKindOptions option) 44=> (option & TypeKindOptions.Class) != 0 ? true : false; 46public static bool IsStructure(TypeKindOptions option) 47=> (option & TypeKindOptions.Structure) != 0 ? true : false; 49public static bool IsInterface(TypeKindOptions option) 50=> (option & TypeKindOptions.Interface) != 0 ? true : false; 52public static bool IsEnum(TypeKindOptions option) 53=> (option & TypeKindOptions.Enum) != 0 ? true : false; 55public static bool IsDelegate(TypeKindOptions option) 56=> (option & TypeKindOptions.Delegate) != 0 ? true : false; 58public static bool IsModule(TypeKindOptions option) 59=> (option & TypeKindOptions.Module) != 0 ? true : false; 61public static TypeKindOptions RemoveOptions(TypeKindOptions fromValue, params TypeKindOptions[] removeValues) 63var tempReturnValue = fromValue; 64foreach (var removeValue in removeValues) 72internal static TypeKindOptions AddOption(TypeKindOptions toValue, TypeKindOptions addValue)