Example #1
0
 public bool AreEqual(ShaderSource shaderSource, SiliconStudio.Shaders.Parser.ShaderMacro[] macros)
 {
     return ShaderSource.Equals(shaderSource) && macros.All(macro => Macros.Any(x => x.Name == macro.Name && x.Definition == macro.Definition)) && Macros.All(macro => macros.Any(x => x.Name == macro.Name && x.Definition == macro.Definition));
 }
 /// <summary>
 /// Tests the equality of the macro sets.
 /// </summary>
 /// <param name="macros0">The first set of macros.</param>
 /// <param name="macros1">The second set of macros.</param>
 /// <returns>True if the sets match, false otherwise.</returns>
 private static bool AreMacrosEqual(SiliconStudio.Shaders.Parser.ShaderMacro[] macros0, SiliconStudio.Shaders.Parser.ShaderMacro[] macros1)
 {
     return macros0.All(macro => macros1.Any(x => x.Name == macro.Name && x.Definition == macro.Definition)) && macros1.All(macro => macros0.Any(x => x.Name == macro.Name && x.Definition == macro.Definition));
 }