public MethodSerializationModel(MethodBase baseMethod)
        {
            this.Name          = baseMethod.Name;
            this.IsAbstract    = baseMethod.IsAbstract;
            this.Accessibility = baseMethod.Accessibility;
            this.Extension     = baseMethod.Extension;
            this.ReturnType    = TypeSerializationModel.GetOrAdd(baseMethod.ReturnType);
            this.IsStatic      = baseMethod.IsStatic;
            this.VirtualEnum   = baseMethod.VirtualEnum;

            GenericArguments = baseMethod.GenericArguments?.Select(TypeSerializationModel.GetOrAdd).ToList();

            Parameters = baseMethod.Parameters?.Select(t => new ParameterSerializationModel(t)).ToList();
        }
Beispiel #2
0
        public MethodSerializationModel(MethodBase baseMethod)
        {
            Name       = baseMethod.name;
            Extension  = baseMethod.extension;
            ReturnType = TypeSerializationModel.GetOrAdd(baseMethod.returnType);
            Modifiers  = new Tuple <AccessLevelEnum, AbstractEnum, StaticEnum, VirtualEnum>(
                baseMethod.modifiers.Item1,
                baseMethod.modifiers.Item2,
                baseMethod.modifiers.Item3,
                baseMethod.modifiers.Item4);

            GenericArguments = baseMethod.genericArguments?.Select(t => TypeSerializationModel.GetOrAdd(t));
            Parameters       = baseMethod.parameters?.Select(t => new ParameterSerializationModel(t));
        }
Beispiel #3
0
 public PropertySerializationModel(PropertyBase baseProperty)
 {
     this.Name = baseProperty.Name;
     this.Type = TypeSerializationModel.GetOrAdd(baseProperty.Type);
 }
 public NamespaceSerializationModel(NamespaceBase namespaceBase)
 {
     this.Name = namespaceBase.Name;
     Types     = namespaceBase.Types?.Select(t => TypeSerializationModel.GetOrAdd(t)).ToList();
 }
 public ParameterSerializationModel(ParameterBase baseParameter)
 {
     this.Name = baseParameter.Name;
     this.Type = TypeSerializationModel.GetOrAdd(baseParameter.Type);
 }
Beispiel #6
0
 public NamespaceSerializationModel(NamespaceBase namespaceBase)
 {
     Name  = namespaceBase.name;
     Types = namespaceBase.types?.Select(t => TypeSerializationModel.GetOrAdd(t));
 }
 public ParameterSerializationModel(ParameterBase baseParameter)
 {
     Name = baseParameter.name;
     Type = TypeSerializationModel.GetOrAdd(baseParameter.typeMetadata);
 }
Beispiel #8
0
 public PropertySerializationModel(PropertyBase baseProperty)
 {
     Name = baseProperty.name;
     Type = TypeSerializationModel.GetOrAdd(baseProperty.typeMetadata);
 }