MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetMembers

Method GetMembers

Source/Tools/Flax.Build/CommandLine.cs:103–124  ·  view source on GitHub ↗

Gets the options for command line configuration for the given type. The type. The list of configurable options.

(Type type)

Source from the content-addressed store, hash-verified

101 /// <param name="type">The type.</param>
102 /// <returns>The list of configurable options.</returns>
103 public static Dictionary<CommandLineAttribute, MemberInfo> GetMembers(Type type)
104 {
105 if (type == null)
106 throw new ArgumentNullException();
107
108 var result = new Dictionary<CommandLineAttribute, MemberInfo>();
109
110 var members = type.GetMembers(BindingFlags.Static | BindingFlags.Public);
111
112 for (int i = 0; i < members.Length; i++)
113 {
114 var member = members[i];
115
116 var attribute = member.GetCustomAttribute<CommandLineAttribute>();
117 if (attribute != null)
118 {
119 result.Add(attribute, member);
120 }
121 }
122
123 return result;
124 }
125
126 /// <summary>
127 /// Gets the options for command line configuration for the given object instance.

Callers

nothing calls this directly

Calls 2

AddMethod · 0.45
GetTypeMethod · 0.45

Tested by

no test coverage detected