43 references to TypeKindOptions
Microsoft.CodeAnalysis.Features (43)
GenerateType\AbstractGenerateTypeService.CodeAction.cs (19)
105var typeKindValue = GetTypeKindOption(_state); 119private TypeKindOptions GetTypeKindOption(State state) 121var gotPreassignedTypeOptions = GetPredefinedTypeKindOption(state, out var typeKindValue); 124typeKindValue = state.IsSimpleNameGeneric ? TypeKindOptionsHelper.RemoveOptions(typeKindValue, TypeKindOptions.GenericInCompatibleTypes) : typeKindValue; 125typeKindValue = state.IsMembersWithModule ? TypeKindOptionsHelper.AddOption(typeKindValue, TypeKindOptions.Module) : typeKindValue; 126typeKindValue = state.IsInterfaceOrEnumNotAllowedInTypeContext ? TypeKindOptionsHelper.RemoveOptions(typeKindValue, TypeKindOptions.Interface, TypeKindOptions.Enum) : typeKindValue; 127typeKindValue = state.IsDelegateAllowed ? typeKindValue : TypeKindOptionsHelper.RemoveOptions(typeKindValue, TypeKindOptions.Delegate); 128typeKindValue = state.IsEnumNotAllowed ? TypeKindOptionsHelper.RemoveOptions(typeKindValue, TypeKindOptions.Enum) : typeKindValue; 134private bool GetPredefinedTypeKindOption(State state, out TypeKindOptions typeKindValueFinal) 138typeKindValueFinal = TypeKindOptions.Attribute; 142if (_service.TryGetBaseList(state.NameOrMemberAccessExpression, out var typeKindValue)) 150typeKindValueFinal = TypeKindOptions.BaseList; 156typeKindValueFinal = TypeKindOptions.Delegate; 162typeKindValueFinal = state.IsSimpleNameGeneric ? TypeKindOptionsHelper.RemoveOptions(TypeKindOptions.MemberAccessWithNamespace, TypeKindOptions.GenericInCompatibleTypes) : TypeKindOptions.MemberAccessWithNamespace; 163typeKindValueFinal = state.IsEnumNotAllowed ? TypeKindOptionsHelper.RemoveOptions(typeKindValueFinal, TypeKindOptions.Enum) : typeKindValueFinal; 167typeKindValueFinal = TypeKindOptions.AllOptions;
GenerateType\AbstractGenerateTypeService.cs (1)
51internal abstract bool TryGetBaseList(TExpressionSyntax expression, out TypeKindOptions returnValue);
GenerateType\GenerateTypeDialogOptions.cs (3)
9TypeKindOptions typeKindOptions = TypeKindOptions.AllOptions, 13public TypeKindOptions TypeKindOptions { get; } = typeKindOptions;
GenerateType\TypeKindOptions.cs (20)
41public static bool IsClass(TypeKindOptions option) 42=> (option & TypeKindOptions.Class) != 0 ? true : false; 44public static bool IsStructure(TypeKindOptions option) 45=> (option & TypeKindOptions.Structure) != 0 ? true : false; 47public static bool IsInterface(TypeKindOptions option) 48=> (option & TypeKindOptions.Interface) != 0 ? true : false; 50public static bool IsEnum(TypeKindOptions option) 51=> (option & TypeKindOptions.Enum) != 0 ? true : false; 53public static bool IsDelegate(TypeKindOptions option) 54=> (option & TypeKindOptions.Delegate) != 0 ? true : false; 56public static bool IsModule(TypeKindOptions option) 57=> (option & TypeKindOptions.Module) != 0 ? true : false; 59public static TypeKindOptions RemoveOptions(TypeKindOptions fromValue, params TypeKindOptions[] removeValues) 61var tempReturnValue = fromValue; 62foreach (var removeValue in removeValues) 70internal static TypeKindOptions AddOption(TypeKindOptions toValue, TypeKindOptions addValue)