예제 #1
0
        public static IntermediateSymbolDefinition ByType(ExampleSymbolDefinitionType type)
        {
            switch (type)
            {
            case ExampleSymbolDefinitionType.Example:
                return(ExampleSymbolDefinitions.Example);

            case ExampleSymbolDefinitionType.ExampleSearch:
                return(ExampleSymbolDefinitions.ExampleSearch);

            default:
                throw new ArgumentOutOfRangeException(nameof(type));
            }
        }
예제 #2
0
 public static bool TryGetSymbolType(string name, out ExampleSymbolDefinitionType type)
 {
     return(Enum.TryParse(name, out type));
 }