Esempio n. 1
0
        public Task <IdResult> MapAsync(Type type, MethodInfo method)
        {
            type.ThrowIfNull("type");
            method.ThrowIfNull("method");

            return(IdResult.IdMapped(_guidFactory.Random()).AsCompletedTask());
        }
        public Task <IdResult> MapAsync(Type type, MethodInfo method)
        {
            type.ThrowIfNull("type");
            method.ThrowIfNull("method");

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

            return((attribute != null ? IdResult.IdMapped(attribute.Id) : IdResult.IdNotMapped()).AsCompletedTask());
        }