Akka.Interfaced.ProtobufSerializer.AutoSurrogate.FindSurrogateSourceType C# (CSharp) Метод

FindSurrogateSourceType() публичный статический Метод

public static FindSurrogateSourceType ( Type type ) : Type
type System.Type
Результат System.Type
        public static Type FindSurrogateSourceType(Type type)
        {
            var flags = BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic;
            foreach (var m in type.GetMethods(flags))
            {
                var parameters = m.GetParameters();
                if (parameters.Length == 1 && m.ReturnType.Name != "Void" && m.ReturnType != type)
                {
                    if (Attribute.GetCustomAttribute(m, typeof(ProtoBuf.ProtoConverterAttribute)) != null)
                        return m.ReturnType;
                    if (m.Name == "op_Implicit" || m.Name == "op_Explicit")
                        return m.ReturnType;
                }
            }
            return null;
        }
    }