As MadHatter said, the license pretty clearly says that you aren't allowed to modify that source code, nor do anything else that doesn't involve just lookin at it.
As for the root of your question (access to an Internal class), the best solution would be to use Reflection. For your specific case, you could do something like this to call the AssignNewShaderToMaterial method:
Assembly thisAssembly = Assembly.GetCallingAssembly();
BindingFlags bindingFlags = BindingFlags.Instance | BindingFlags.NonPublic;
object? standardShaderGUIInstance = thisAssembly.CreateInstance("UnityEditor.StandardShaderGUI",
true, bindingFlags, null, null, null, null);
if (standardShaderGUIInstance == null)
{
Debug.Log("Could not find the StandardShaderGUI class. Aborting!");
return;
}
Type standardShaderGUIType = standardShaderGUIInstance.GetType();
MethodInfo? standardShaderGUIMethodInfo = standardShaderGUIType.GetMethod("AssignNewShaderToMaterial");
if (standardShaderGUIMethodInfo == null)
{
Debug.Log("Could not find the AssignNewShaderToMaterial method. Aborting!");
return;
}
object[] parameters = {material, oldShader, newShader};
standardShaderGUIMethodInfo.Invoke(standardShaderGUIInstance, parameters);
Also, I assume you're trying to run your code in the Editor. If you're trying to access this class in a built version of the game, it likely doesn't exist because it's part of the UnityEditor namespace.
If you need any more help, it might be best to ask on StackOverflow.