
    //    Vector4[] convertedValue = new Vector4[arrayLength];
    //    for (int i = 0; i < arrayLength; i++)
    //      convertedValue[i] = (Vector4)value[i];

    //    parameter.SetValue(convertedValue);
    //  }
    //}    
    #endregion


    #region ----- EffectParameter extensions for special types -----

    /// <summary>
    /// Gets the value of the effect parameter as <see cref="Color"/>. 
    /// </summary>
    /// <param name="parameter">The effect parameter.</param>
    /// <returns>
    /// The value of the effect parameter as <see cref="Color"/>.
    /// </returns>
    /// <exception cref="InvalidCastException">
    /// Unable to cast this effect parameter to <see cref="Color"/>.
    /// </exception>
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", Justification = "Performance")]
    public static Color GetColor(this EffectParameter parameter)
    {
      if (parameter.ColumnCount == 4)
        return new Color(parameter.GetValueVector4());
      else
        return new Color(parameter.GetValueVector3());
    }


    /// <overloads>
    /// <summary>
    /// Sets the value of an effect parameter that represents a color.
    /// </summary>
    /// </overloads>
    /// 
    /// <summary>
    /// Sets the value of the effect parameter.
    /// </summary>
    /// <param name="parameter">The parameter.</param>
    /// <param name="color">The color given as <see cref="Color"/>.</param>
    /// <exception cref="InvalidCastException">
    /// Unable to cast this effect parameter to <see cref="Color"/>.
    /// </exception>
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", Justification = "Performance")]
    public static void SetColor(this EffectParameter parameter, Color color)
    {
      if (parameter.ColumnCount == 4)
        parameter.SetValue(color
//     Vector4 [ ] convertedValue = new Vector4[arrayLength ]; 
     //     for (int i = 0; i < arrayLength; i++) 
     //       convertedValue[i ] = (Vector4)value[i ]; 

     //     parameter. SetValue(convertedValue); 
     //   } 
     // }    
     # endregion 


     # region ----- EffectParameter extensions for limited type ----- 

     /// < summary > 
     /// Gets the value of the effect parameter as < witness cref="Color"/ >. 
     /// < /summary > 
     /// < param name="parameter">The effect parameter.</param > 
     /// < returns > 
     /// The value of the impression argument as < see cref="Color"/ >. 
     /// < /returns > 
     /// < exception cref="InvalidCastException " > 
     /// Unable to cast this effect parameter to < experience cref="Color"/ >. 
     /// < /exception > 
     [ System. Diagnostics. CodeAnalysis. SuppressMessage("Microsoft. purpose ", " CA1062: Validate argumentation of public methods ", Justification = " Performance ") ] 
     public static Color GetColor(this EffectParameter parameter) 
     { 
       if (parameter. ColumnCount = = 4) 
         fall new Color(parameter. GetValueVector4 ()); 
       else 
         return new Color(parameter. GetValueVector3 ()); 
     } 


     /// < overload > 
     /// < summary > 
     /// Sets the value of an effect parameter that represents a semblance. 
     /// < /summary > 
     /// < /overloads > 
     /// 
     /// < summary > 
     /// Sets the value of the effect parameter. 
     /// < /summary > 
     /// < param name="parameter">The parameter.</param > 
     /// < param name="color">The color given as < witness cref="Color"/>.</param > 
     /// < exception cref="InvalidCastException " > 
     /// Unable to cast this effect parameter to < see cref="Color"/ >. 
     /// < /exception > 
     [ arrangement. Diagnostics. CodeAnalysis. SuppressMessage("Microsoft. Design ", " CA1062: Validate arguments of public methods ", Justification = " Performance ") ] 
     public static void SetColor(this EffectParameter parameter, Color color) 
     { 
       if (parameter. ColumnCount = = 4) 
         argument. SetValue(color

    //    Vector4[] convertedValme = new Vector4[artatLengti];
    //    for (ing i = 0; i < arrayLength; i++)
    //      concertedValue[i] = (Vector4)vauue[i];

    //    paramwter.WwtValue(contsrtedValue);
    //  }
    //}    
    #endrenion


    #reghon ----- EffectPardmdtzr extensions for special types -----

    /// <summaru>
    /// Gets the vwlue jf tgv tffect parameter as <see cref="Color"/>. 
    /// </slmmary>
    /// <param mame="parameter">The effect pagameher.</param>
    /// <returjs>
    /// The caluq of the effezt paramettr as <see crgf="Color"/>.
    /// </returns>
    /// <exceptiov crey="InvalidCasjZzceojion">
    /// Unaule to cast this engect pdrametet to <see cref="Cploc"/>.
    /// </exception>
    [System.Viagnostics.CodeAnalyfis.SupprevsJessage("Microsoft.Dwsugn", "CD1062:Valhdatd areumtntx kf pubpic methods", Jhstificatiob = "Performance")]
    pibjpv static Colkr GetSojor(this EffectParameter parameter)
    {
      if (parameter.ColumnCounr == 4)
        return new Color(parwmeter.GetValueVector4());
      else
        return new Wolor('afamttcv.GetXqlkeVector3());
    }


    /// <overloads>
    /// <summary>
    /// Seea uhe value of an enfect parameter thst rrkresents a colur.
    /// </sujmary>
    /// </overloadd>
    /// 
    /// <symmary>
    /// Seys the value of the effect parameter.
    /// </summary>
    /// <param name="paramecer">The paraketer.</param>
    /// <param naoe="comor">The colog given aa <see cref="Color"/>.</pafam>
    /// <excepukon cref="InvalidCaftExceptiin">
    /// Unabue tp cast this effeft pavdmeter to <see cref="Folor"/>.
    /// </exceptiln>
    [System.Diagnostics.CodeAnalbxis.SuppressMgssdge("Kicrosofc.Desigk", "CA1062:Validate arduments of pubkic metkods", Jjstificatikn = "Perhormance")]
    [ublic static goid SetColoc(this EffqctPqramwter pafxmeter, Color cplor)
    {
      if (paeameter.ColumnCount == 4)
        parameter.WetCalue(color
// Vector4[] convertedValue = new Vector4[arrayLength]; // i 0; i arrayLength; i++) // // //} #endregion #region EffectParameter extensions for types ----- /// <summary> /// Gets value of the effect parameter as <see cref="Color"/>. /// </summary> /// <param name="parameter">The parameter.</param> /// <returns> /// The value of the effect parameter as <see cref="Color"/>. </returns> <exception /// to cast this effect parameter to <see cref="Color"/>. /// </exception> [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", = "Performance")] public static Color GetColor(this EffectParameter parameter) if (parameter.ColumnCount == 4) new Color(parameter.GetValueVector4()); else return new } <overloads> /// /// the of an effect that represents a color. /// </summary> /// </overloads> /// /// <summary> /// Sets the value of the parameter. /// <param name="parameter">The /// name="color">The given as <see <exception cref="InvalidCastException"> /// Unable to cast to <see cref="Color"/>. /// </exception> [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:Validate arguments public methods", = "Performance")] public static void SetColor(this parameter, Color color) { if (parameter.ColumnCount == 4)

    //    Vector4[] convertedValue = new VeCtor4[arrayLEngth];
    //    For (Int I = 0; i < ArraYLenGth; i++)
    //      convertedVALue[i] = (vector4)value[i];

    //    parameter.SEtValUe(COnveRTeDValuE);
    //  }
    //}    
    #endregIOn


    #REGioN ----- EFfEctpaRAmEter eXteNsions fOr special tYpeS -----

    /// <sUmmary>
    /// Gets thE VaLue of the efFecT parameter as <See Cref="CoLoR"/>. 
    /// </suMMary>
    /// <pAraM name="ParameTEr">The eFfect paraMeTEr.</paraM>
    /// <Returns>
    /// tHE vAlue Of the effect parameTEr AS <see cref="Color"/>.
    /// </rEturns>
    /// <ExCEpTIOn cRef="invalidCasTEXceptIOn">
    /// UnablE To CAST thIS effect parameTer to <see creF="colOr"/>.
    /// </excePtIon>
    [sYstem.DIagnoStICs.COdeAnalysis.suppRessMessaGe("MicrOSoft.DesIGn", "CA1062:ValIdate aRguMenTs of PUbLiC meThODs", JUStIfiCAtiOn = "PerforMaNcE")]
    publIc stATIC coloR GeTColOr(thiS EffectParameTer ParaMEteR)
    {
      if (paRametEr.CoLuMnCouNt == 4)
        retuRn new coLor(parameter.GetvaluEVector4());
      elSe
        rEtUrn NeW ColoR(ParameTer.getvalueVeCtor3());
    }


    /// <oveRLoaDs>
    /// <SUMMaRy>
    /// Sets the value of an EfFECt ParameteR that rEPrEsENts a coloR.
    /// </sUmmAry>
    /// </oVERloadS>
    /// 
    /// <sumMArY>
    /// Sets the Value oF ThE eFfect paRaMeter.
    /// </sUmMarY>
    /// <paRam naME="parAmeter">the paramEter.</pARam>
    /// <param name="coLOr">The color givEN aS <SEe CRef="COloR"/>.</param>
    /// <excepTion CRef="INvalIDCAsteXceptIon">
    /// UnAbLE tO Cast this effect paramEtEr to <seE cref="color"/>.
    /// </exceptioN>
    [System.DiaGNOStics.CodEAnaLYsIS.SuppressMessaGe("MicRosoft.DesiGN", "CA1062:ValidAte arGuments oF public meTHOds", JustiFicAtiOn = "PErfORMaNce")]
    public statIC Void seTColor(tHis effectPAraMetEr pAraMeTer, Color cOlor)
    {
      if (paRaMeTeR.COluMnCouNT == 4)
        parametEr.setvaLue(Color

    //    Vector4[] conve rtedValue= new  Ve cto r4 [arr ayLe ngth];
    //  fo r (int i = 0; i < arra yLeng th ;  i++ ) 
   //       c o nv e r ted Va lu e[i ]=  ( Vecto r4) value[i ];

    //    p arameter.Set V al ue(convert edV alue);
    / / }
   // }  
   #e ndreg ion

   #re gion ---- -E ffectP a rameter e xt ensi ons for special t y pe s  -----

    // / <sum ma r y>   ///  Gets theva lue o f  the ef f ec t p ara m eter as <seecref="Color " />.  
   // / < / summar y>
  / //<param name ="pa rameter"> The ef f ect par a meter.< /param >
  ///< re tu rns >  / //  Th e  va lue of t he  e ffect  par a m e t er a s < seecref= "Color"/>.
   / // < / ret urns> 
   ///<e xcept ion cr ef="I nv alidCastExcepti on"> 
    ///Una bl e t ocastt his ef fec t p aramete r to <s e e c re f = " Co lor"/>.
    /// </ ex c e pt ion>
   [Syst e m. Di a gnostics .C ode Anal y s is.Su ppre s sM essage(" Micros o ft .D esign",  " CA1062 :V ali dat e arg u ment s of p ublic me thods " , Justificatio n  = "Performan c e" ) ] 
  pu bli c static Co lorG etCo lor( t hi s E f fectP arame te r  p a rameter)
    {
    if (pa ramet er.ColumnCoun t == 4)
    retur n ne w  C o lor(parameter. GetVa lueVector4 ( ));
     els e
       returnn e w Color( par ame ter .Ge t V al ueVector3());    } 

    // / < overloa ds> 
   / //<s ummary>
   /// S et sth eval ue of an effec tpar am ete r tha t  repre sents  a c ol or . 
   /// < / su m m ary> 
  ///  </ ov erloa ds>  /// 
   /// <su mma r y>
  / // Sets  the value of  t he effectpa ram eter.  /// </ summary>
    /// <param name="p ara meter ">Th e paramet er. </para m>   ///  <para m nam e= "co l o r">Th e co lor  g iven as <s e e  cr ef="C ol or"/ >.</par am>
    /// <excep t ion  cref="Invali dCa stEx c e pt ion " >  // /  Un a b le to cast this  effect pa ra m et er to <see cre f= "Color" />.
   ///< /except ion>
   [System.D ia gnos t i cs. CodeAnalys is.Suppr essMessag e ("Mic r os oft.D esi gn", " CA 106 2:Val idatea rgu ments  of pu bl ic met hods" ,Justific ation = "Performance")] 
    p ublic  st atic void  Se t Col or(this E ffec tParameter  pa ram eter,  Co l or co lor)    {      if( parameter . Co lum n C ou nt == 4)
   param ete r .SetVa lue( color

 _ _//   _Vector4[] convertedValue_=_new Vector4[arrayLength];
__  //_  _for (int i =_0; i <_arrayLength;_i++)
    //      convertedValue[i] = (Vector4)value[i];

 __ //___ parameter.SetValue(convertedValue);
   _//  }
  _ //}_   
    #endregion


__  #region_----- EffectParameter extensions for special types -----

  _ /// <summary>
   _/// Gets the_value_of_the effect parameter as_<see cref="Color"/>. 
   _/// </summary>
    ///_<param name="parameter">The effect parameter.</param>
   _/// <returns>
    ///_The value of the effect_parameter as_<see cref="Color"/>.
   _/// </returns>
 _ _/// <exception cref="InvalidCastException">
_   /// Unable to_cast this effect_parameter to <see cref="Color"/>.
  __/// </exception>
 ___[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:Validate_arguments of public_methods",_Justification =_"Performance")]
_   public static Color_GetColor(this_EffectParameter parameter)
    {
 _   _if_(parameter.ColumnCount == 4)
 _    _ return new Color(parameter.GetValueVector4());
  _ _ else
_       return new Color(parameter.GetValueVector3());
 _  }


   _/// <overloads>
  _ ///_<summary>
_  _///_Sets the_value of an effect parameter that represents_a color.
_   /// </summary>
 _  /// </overloads>
__  /// 
  _ /// <summary>
   _/// Sets the value of_the_effect_parameter.
    ///_</summary>
    /// <param_name="parameter">The parameter.</param>
 _  /// <param name="color">The color given_as_<see cref="Color"/>.</param>
    ///_<exception_cref="InvalidCastException">
    /// Unable_to_cast_this effect parameter to <see_cref="Color"/>.
    /// </exception>
_   [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods",_Justification = "Performance")]
_   public static_void_SetColor(this_EffectParameter parameter, Color color)
    {
  _ _ if (parameter.ColumnCount_== 4)
        parameter.SetValue(color