Skip to content

Instantly share code, notes, and snippets.

@jcdickinson
Created February 12, 2011 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcdickinson/823828 to your computer and use it in GitHub Desktop.
Save jcdickinson/823828 to your computer and use it in GitHub Desktop.
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