Пример #1
0
 public static void TrySet(this EffectParameterCollection parameters, string name, bool value)
 {
     if (parameters.Any(parameter => parameter.Name == name))
     {
         parameters[name].SetValue(value);
     }
 }
Пример #2
0
 public static EffectParameter TryGet(this EffectParameterCollection parameters, string name) =>
 parameters.Any(parameter => parameter.Name == name) ? parameters[name] : null;