Junior.Route.AutoRouting.NameMappers.NameResult.NameMapped C# (CSharp) Method

NameMapped() public static method

public static NameMapped ( string name ) : NameResult
name string
return NameResult
        public static NameResult NameMapped(string name)
        {
            name.ThrowIfNull("name");

            return new NameResult(NameResultType.NameMapped, name);
        }

Usage Example

        public Task <NameResult> MapAsync(Type type, MethodInfo method)
        {
            type.ThrowIfNull("type");
            method.ThrowIfNull("method");

            NameAttribute attribute = method.GetCustomAttributes(typeof(NameAttribute), false).Cast <NameAttribute>().SingleOrDefault();

            return((attribute != null ? NameResult.NameMapped(attribute.Name) : NameResult.NameNotMapped()).AsCompletedTask());
        }
All Usage Examples Of Junior.Route.AutoRouting.NameMappers.NameResult::NameMapped