Created
February 12, 2011 15:38
-
-
Save jcdickinson/823828 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public System.CodeDom.Compiler.CodeDomProvider CreateProvider(System.Collections.Generic.IDictionary providerOptions) | |
{ | |
System.Reflection.ConstructorInfo constructorInfo1; | |
System.Type[] typeArray1; | |
object[] objectArray1; | |
object[] objectArray1; // No idea why it generates the same name twice. | |
if (!providerOptions) | |
{ | |
throw new System.ArgumentNullException("providerOptions"); | |
} | |
// Ok either: | |
// typeArray1[0] = System.Type.GetTypeFromHandle(System.Collections.Generic.IDictionary); | |
// typeArray1[0].GetConstructor(typeArray1); | |
// Or: | |
// constructorInfo1 = (typeArray1[0] = System.Type.GetTypeFromHandle(System.Collections.Generic.IDictionary)).GetConstructor(typeArray1); | |
// Also: | |
// new typeArray1[..] is missing. | |
constructorInfo1 = typeArray1[0] = System.Type.GetTypeFromHandle(System.Collections.Generic.IDictionary).GetConstructor(typeArray1); | |
if (constructorInfo1 != null) | |
{ | |
return (System.CodeDom.Compiler.CodeDomProvider)objectArray1[0] = providerOptions.Invoke(objectArray1); | |
} | |
throw new System.InvalidOperationException(System.SR.GetString(objectArray1[0] = this.CodeDomProviderType.ToString(), objectArray1)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment