Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ UsingNamespace()

virtual void System.Reflection.Emit.ILGenerator.UsingNamespace ( string usingNamespace)
inlinevirtual

Reimplemented in System.Reflection.Emit.DynamicILGenerator.

Definition at line 1026 of file ILGenerator.cs.

1027 {
1028 if (usingNamespace == null)
1029 {
1030 throw new ArgumentNullException("usingNamespace");
1031 }
1032 if (usingNamespace.Length == 0)
1033 {
1034 throw new ArgumentException(SR.Argument_EmptyName, "usingNamespace");
1035 }
1036 MethodBuilder methodBuilder = m_methodBuilder as MethodBuilder;
1037 if (methodBuilder == null)
1038 {
1039 throw new NotSupportedException();
1040 }
1041 int currentActiveScopeIndex = methodBuilder.GetILGenerator().m_ScopeTree.GetCurrentActiveScopeIndex();
1042 if (currentActiveScopeIndex == -1)
1043 {
1044 methodBuilder.m_localSymInfo.AddUsingNamespace(usingNamespace);
1045 }
1046 else
1047 {
1049 }
1050 }
void AddUsingNamespaceToCurrentScope(string strNamespace)
Definition ScopeTree.cs:37

References System.Reflection.Emit.LocalSymInfo.AddUsingNamespace(), System.Reflection.Emit.ScopeTree.AddUsingNamespaceToCurrentScope(), System.SR.Argument_EmptyName, System.Reflection.Emit.ScopeTree.GetCurrentActiveScopeIndex(), System.Reflection.Emit.MethodBuilder.GetILGenerator(), System.Reflection.Emit.MethodBuilder.m_localSymInfo, System.Reflection.Emit.ILGenerator.m_methodBuilder, and System.Reflection.Emit.ILGenerator.m_ScopeTree.