/// <summary> /// Constructor /// </summary> /// <remarks>Use CpProxy::[Un]Subscribe() to enable/disable querying of state variable and reporting of their changes.</remarks> /// <param name="aDevice">The device to use</param> public CpProxyAvOpenhomeOrgExakt2(ICpDevice aDevice) : base("av-openhome-org", "Exakt", 2, aDevice) { OpenHome.Net.Core.Parameter param; List <String> allowedValues = new List <String>(); iActionDeviceList = new OpenHome.Net.Core.Action("DeviceList"); param = new ParameterString("List", allowedValues); iActionDeviceList.AddOutputParameter(param); iActionDeviceSettings = new OpenHome.Net.Core.Action("DeviceSettings"); param = new ParameterString("DeviceId", allowedValues); iActionDeviceSettings.AddInputParameter(param); param = new ParameterString("Settings", allowedValues); iActionDeviceSettings.AddOutputParameter(param); iActionConnectionStatus = new OpenHome.Net.Core.Action("ConnectionStatus"); param = new ParameterString("ConnectionStatus", allowedValues); iActionConnectionStatus.AddOutputParameter(param); iActionSet = new OpenHome.Net.Core.Action("Set"); param = new ParameterString("DeviceId", allowedValues); iActionSet.AddInputParameter(param); param = new ParameterUint("BankId"); iActionSet.AddInputParameter(param); param = new ParameterString("FileUri", allowedValues); iActionSet.AddInputParameter(param); param = new ParameterBool("Mute"); iActionSet.AddInputParameter(param); param = new ParameterBool("Persist"); iActionSet.AddInputParameter(param); iActionReprogram = new OpenHome.Net.Core.Action("Reprogram"); param = new ParameterString("DeviceId", allowedValues); iActionReprogram.AddInputParameter(param); param = new ParameterString("FileUri", allowedValues); iActionReprogram.AddInputParameter(param); iActionReprogramFallback = new OpenHome.Net.Core.Action("ReprogramFallback"); param = new ParameterString("DeviceId", allowedValues); iActionReprogramFallback.AddInputParameter(param); param = new ParameterString("FileUri", allowedValues); iActionReprogramFallback.AddInputParameter(param); iActionVersion = new OpenHome.Net.Core.Action("Version"); param = new ParameterString("Version", allowedValues); iActionVersion.AddOutputParameter(param); iDeviceList = new PropertyString("DeviceList", DeviceListPropertyChanged); AddProperty(iDeviceList); iConnectionStatus = new PropertyString("ConnectionStatus", ConnectionStatusPropertyChanged); AddProperty(iConnectionStatus); iVersion = new PropertyString("Version", VersionPropertyChanged); AddProperty(iVersion); iPropertyLock = new Mutex(); }
public override bool Equals(object _Other) { ParameterBool Other = _Other as ParameterBool; if (Other == null) { throw new Exception("Other parameter is not of type FLOAT !"); } return(Other.m_bValue == m_bValue); }
/// <summary> /// Constructor /// </summary> /// <remarks>Use CpProxy::[Un]Subscribe() to enable/disable querying of state variable and reporting of their changes.</remarks> /// <param name="aDevice">The device to use</param> public CpProxyLinnCoUkCloud1(ICpDevice aDevice) : base("linn-co-uk", "Cloud", 1, aDevice) { OpenHome.Net.Core.Parameter param; List <String> allowedValues = new List <String>(); iActionGetChallengeResponse = new OpenHome.Net.Core.Action("GetChallengeResponse"); param = new ParameterString("Challenge", allowedValues); iActionGetChallengeResponse.AddInputParameter(param); param = new ParameterString("Response", allowedValues); iActionGetChallengeResponse.AddOutputParameter(param); iActionSetAssociated = new OpenHome.Net.Core.Action("SetAssociated"); param = new ParameterBinary("AesKeyRsaEncrypted"); iActionSetAssociated.AddInputParameter(param); param = new ParameterBinary("InitVectorRsaEncrypted"); iActionSetAssociated.AddInputParameter(param); param = new ParameterBinary("TokenAesEncrypted"); iActionSetAssociated.AddInputParameter(param); param = new ParameterBool("Associated"); iActionSetAssociated.AddInputParameter(param); iActionSetControlEnabled = new OpenHome.Net.Core.Action("SetControlEnabled"); param = new ParameterBool("Enabled"); iActionSetControlEnabled.AddInputParameter(param); iActionGetControlEnabled = new OpenHome.Net.Core.Action("GetControlEnabled"); param = new ParameterBool("Enabled"); iActionGetControlEnabled.AddOutputParameter(param); iActionGetConnected = new OpenHome.Net.Core.Action("GetConnected"); param = new ParameterBool("Connected"); iActionGetConnected.AddOutputParameter(param); iActionGetPublicKey = new OpenHome.Net.Core.Action("GetPublicKey"); param = new ParameterString("PublicKey", allowedValues); iActionGetPublicKey.AddOutputParameter(param); iAssociationStatus = new PropertyString("AssociationStatus", AssociationStatusPropertyChanged); AddProperty(iAssociationStatus); iControlEnabled = new PropertyBool("ControlEnabled", ControlEnabledPropertyChanged); AddProperty(iControlEnabled); iConnected = new PropertyBool("Connected", ConnectedPropertyChanged); AddProperty(iConnected); iPublicKey = new PropertyString("PublicKey", PublicKeyPropertyChanged); AddProperty(iPublicKey); iPropertyLock = new Mutex(); }
/// <summary> /// Creates a new parameter /// </summary> /// <param name="_Name"></param> /// <param name="_Type"></param> /// <returns></returns> public Parameter CreateParameter(string _Name, PARAMETER_TYPE _Type) { Parameter Result = null; switch (_Type) { case PARAMETER_TYPE.BOOL: Result = new ParameterBool(this, _Name); break; case PARAMETER_TYPE.INT: Result = new ParameterInt(this, _Name); break; case PARAMETER_TYPE.FLOAT: Result = new ParameterFloat(this, _Name); break; case PARAMETER_TYPE.FLOAT2: Result = new ParameterFloat2(this, _Name); break; case PARAMETER_TYPE.FLOAT3: Result = new ParameterFloat3(this, _Name); break; case PARAMETER_TYPE.FLOAT4: Result = new ParameterFloat4(this, _Name); break; case PARAMETER_TYPE.MATRIX4: Result = new ParameterMatrix4(this, _Name); break; case PARAMETER_TYPE.TEXTURE2D: Result = new ParameterTexture2D(this, _Name); break; default: throw new Exception("Unsupported parameter type !"); } // Add it... m_Parameters.Add(Result); m_Name2Parameter.Add(Result.Name, Result); return(Result); }
/// <summary> /// Constructor /// </summary> /// <remarks>Use CpProxy::[Un]Subscribe() to enable/disable querying of state variable and reporting of their changes.</remarks> /// <param name="aDevice">The device to use</param> public CpProxyAvOpenhomeOrgSender1(CpDevice aDevice) : base("av-openhome-org", "Sender", 1, aDevice) { OpenHome.Net.Core.Parameter param; List <String> allowedValues = new List <String>(); iActionPresentationUrl = new OpenHome.Net.Core.Action("PresentationUrl"); param = new ParameterString("Value", allowedValues); iActionPresentationUrl.AddOutputParameter(param); iActionMetadata = new OpenHome.Net.Core.Action("Metadata"); param = new ParameterString("Value", allowedValues); iActionMetadata.AddOutputParameter(param); iActionAudio = new OpenHome.Net.Core.Action("Audio"); param = new ParameterBool("Value"); iActionAudio.AddOutputParameter(param); iActionStatus = new OpenHome.Net.Core.Action("Status"); allowedValues.Add("Enabled"); allowedValues.Add("Disabled"); allowedValues.Add("Blocked"); param = new ParameterString("Value", allowedValues); iActionStatus.AddOutputParameter(param); allowedValues.Clear(); iActionAttributes = new OpenHome.Net.Core.Action("Attributes"); param = new ParameterString("Value", allowedValues); iActionAttributes.AddOutputParameter(param); iPresentationUrl = new PropertyString("PresentationUrl", PresentationUrlPropertyChanged); AddProperty(iPresentationUrl); iMetadata = new PropertyString("Metadata", MetadataPropertyChanged); AddProperty(iMetadata); iAudio = new PropertyBool("Audio", AudioPropertyChanged); AddProperty(iAudio); iStatus = new PropertyString("Status", StatusPropertyChanged); AddProperty(iStatus); iAttributes = new PropertyString("Attributes", AttributesPropertyChanged); AddProperty(iAttributes); iPropertyLock = new Mutex(); }
/// <summary> /// Constructor /// </summary> /// <remarks>Use CpProxy::[Un]Subscribe() to enable/disable querying of state variable and reporting of their changes.</remarks> /// <param name="aDevice">The device to use</param> public CpProxyUpnpOrgSwitchPower1(ICpDevice aDevice) : base("schemas-upnp-org", "SwitchPower", 1, aDevice) { OpenHome.Net.Core.Parameter param; iActionSetTarget = new OpenHome.Net.Core.Action("SetTarget"); param = new ParameterBool("newTargetValue"); iActionSetTarget.AddInputParameter(param); iActionGetTarget = new OpenHome.Net.Core.Action("GetTarget"); param = new ParameterBool("RetTargetValue"); iActionGetTarget.AddOutputParameter(param); iActionGetStatus = new OpenHome.Net.Core.Action("GetStatus"); param = new ParameterBool("ResultStatus"); iActionGetStatus.AddOutputParameter(param); iStatus = new PropertyBool("Status", StatusPropertyChanged); AddProperty(iStatus); iPropertyLock = new Mutex(); }
/// <summary> /// Constructor /// </summary> /// <remarks>Use CpProxy::[Un]Subscribe() to enable/disable querying of state variable and reporting of their changes.</remarks> /// <param name="aDevice">The device to use</param> public CpProxyAvOpenhomeOrgInfo1(CpDevice aDevice) : base("av-openhome-org", "Info", 1, aDevice) { OpenHome.Net.Core.Parameter param; List <String> allowedValues = new List <String>(); iActionCounters = new OpenHome.Net.Core.Action("Counters"); param = new ParameterUint("TrackCount"); iActionCounters.AddOutputParameter(param); param = new ParameterUint("DetailsCount"); iActionCounters.AddOutputParameter(param); param = new ParameterUint("MetatextCount"); iActionCounters.AddOutputParameter(param); iActionTrack = new OpenHome.Net.Core.Action("Track"); param = new ParameterString("Uri", allowedValues); iActionTrack.AddOutputParameter(param); param = new ParameterString("Metadata", allowedValues); iActionTrack.AddOutputParameter(param); iActionDetails = new OpenHome.Net.Core.Action("Details"); param = new ParameterUint("Duration"); iActionDetails.AddOutputParameter(param); param = new ParameterUint("BitRate"); iActionDetails.AddOutputParameter(param); param = new ParameterUint("BitDepth"); iActionDetails.AddOutputParameter(param); param = new ParameterUint("SampleRate"); iActionDetails.AddOutputParameter(param); param = new ParameterBool("Lossless"); iActionDetails.AddOutputParameter(param); param = new ParameterString("CodecName", allowedValues); iActionDetails.AddOutputParameter(param); iActionMetatext = new OpenHome.Net.Core.Action("Metatext"); param = new ParameterString("Value", allowedValues); iActionMetatext.AddOutputParameter(param); iTrackCount = new PropertyUint("TrackCount", TrackCountPropertyChanged); AddProperty(iTrackCount); iDetailsCount = new PropertyUint("DetailsCount", DetailsCountPropertyChanged); AddProperty(iDetailsCount); iMetatextCount = new PropertyUint("MetatextCount", MetatextCountPropertyChanged); AddProperty(iMetatextCount); iUri = new PropertyString("Uri", UriPropertyChanged); AddProperty(iUri); iMetadata = new PropertyString("Metadata", MetadataPropertyChanged); AddProperty(iMetadata); iDuration = new PropertyUint("Duration", DurationPropertyChanged); AddProperty(iDuration); iBitRate = new PropertyUint("BitRate", BitRatePropertyChanged); AddProperty(iBitRate); iBitDepth = new PropertyUint("BitDepth", BitDepthPropertyChanged); AddProperty(iBitDepth); iSampleRate = new PropertyUint("SampleRate", SampleRatePropertyChanged); AddProperty(iSampleRate); iLossless = new PropertyBool("Lossless", LosslessPropertyChanged); AddProperty(iLossless); iCodecName = new PropertyString("CodecName", CodecNamePropertyChanged); AddProperty(iCodecName); iMetatext = new PropertyString("Metatext", MetatextPropertyChanged); AddProperty(iMetatext); iPropertyLock = new Mutex(); }
/// <summary> /// Constructor /// </summary> /// <remarks>Use CpProxy::[Un]Subscribe() to enable/disable querying of state variable and reporting of their changes.</remarks> /// <param name="aDevice">The device to use</param> public CpProxyAvOpenhomeOrgCredentials1(ICpDevice aDevice) : base("av-openhome-org", "Credentials", 1, aDevice) { OpenHome.Net.Core.Parameter param; List <String> allowedValues = new List <String>(); iActionSet = new OpenHome.Net.Core.Action("Set"); param = new ParameterString("Id", allowedValues); iActionSet.AddInputParameter(param); param = new ParameterString("UserName", allowedValues); iActionSet.AddInputParameter(param); param = new ParameterBinary("Password"); iActionSet.AddInputParameter(param); iActionClear = new OpenHome.Net.Core.Action("Clear"); param = new ParameterString("Id", allowedValues); iActionClear.AddInputParameter(param); iActionSetEnabled = new OpenHome.Net.Core.Action("SetEnabled"); param = new ParameterString("Id", allowedValues); iActionSetEnabled.AddInputParameter(param); param = new ParameterBool("Enabled"); iActionSetEnabled.AddInputParameter(param); iActionGet = new OpenHome.Net.Core.Action("Get"); param = new ParameterString("Id", allowedValues); iActionGet.AddInputParameter(param); param = new ParameterString("UserName", allowedValues); iActionGet.AddOutputParameter(param); param = new ParameterBinary("Password"); iActionGet.AddOutputParameter(param); param = new ParameterBool("Enabled"); iActionGet.AddOutputParameter(param); param = new ParameterString("Status", allowedValues); iActionGet.AddOutputParameter(param); param = new ParameterString("Data", allowedValues); iActionGet.AddOutputParameter(param); iActionLogin = new OpenHome.Net.Core.Action("Login"); param = new ParameterString("Id", allowedValues); iActionLogin.AddInputParameter(param); param = new ParameterString("Token", allowedValues); iActionLogin.AddOutputParameter(param); iActionReLogin = new OpenHome.Net.Core.Action("ReLogin"); param = new ParameterString("Id", allowedValues); iActionReLogin.AddInputParameter(param); param = new ParameterString("CurrentToken", allowedValues); iActionReLogin.AddInputParameter(param); param = new ParameterString("NewToken", allowedValues); iActionReLogin.AddOutputParameter(param); iActionGetIds = new OpenHome.Net.Core.Action("GetIds"); param = new ParameterString("Ids", allowedValues); iActionGetIds.AddOutputParameter(param); iActionGetPublicKey = new OpenHome.Net.Core.Action("GetPublicKey"); param = new ParameterString("PublicKey", allowedValues); iActionGetPublicKey.AddOutputParameter(param); iActionGetSequenceNumber = new OpenHome.Net.Core.Action("GetSequenceNumber"); param = new ParameterUint("SequenceNumber"); iActionGetSequenceNumber.AddOutputParameter(param); iIds = new PropertyString("Ids", IdsPropertyChanged); AddProperty(iIds); iPublicKey = new PropertyString("PublicKey", PublicKeyPropertyChanged); AddProperty(iPublicKey); iSequenceNumber = new PropertyUint("SequenceNumber", SequenceNumberPropertyChanged); AddProperty(iSequenceNumber); iPropertyLock = new Mutex(); }
/// <summary> /// Constructor /// </summary> /// <remarks>Use CpProxy::[Un]Subscribe() to enable/disable querying of state variable and reporting of their changes.</remarks> /// <param name="aDevice">The device to use</param> public CpProxyAvOpenhomeOrgPins1(ICpDevice aDevice) : base("av-openhome-org", "Pins", 1, aDevice) { OpenHome.Net.Core.Parameter param; List <String> allowedValues = new List <String>(); iActionGetDeviceAccountMax = new OpenHome.Net.Core.Action("GetDeviceAccountMax"); param = new ParameterUint("DeviceMax"); iActionGetDeviceAccountMax.AddOutputParameter(param); param = new ParameterUint("AccountMax"); iActionGetDeviceAccountMax.AddOutputParameter(param); iActionGetModes = new OpenHome.Net.Core.Action("GetModes"); param = new ParameterString("Modes", allowedValues); iActionGetModes.AddOutputParameter(param); iActionGetIdArray = new OpenHome.Net.Core.Action("GetIdArray"); param = new ParameterString("IdArray", allowedValues); iActionGetIdArray.AddOutputParameter(param); iActionReadList = new OpenHome.Net.Core.Action("ReadList"); param = new ParameterString("Ids", allowedValues); iActionReadList.AddInputParameter(param); param = new ParameterString("List", allowedValues); iActionReadList.AddOutputParameter(param); iActionInvokeId = new OpenHome.Net.Core.Action("InvokeId"); param = new ParameterUint("Id"); iActionInvokeId.AddInputParameter(param); iActionInvokeIndex = new OpenHome.Net.Core.Action("InvokeIndex"); param = new ParameterUint("Index"); iActionInvokeIndex.AddInputParameter(param); iActionSetDevice = new OpenHome.Net.Core.Action("SetDevice"); param = new ParameterUint("Index"); iActionSetDevice.AddInputParameter(param); param = new ParameterString("Mode", allowedValues); iActionSetDevice.AddInputParameter(param); param = new ParameterString("Type", allowedValues); iActionSetDevice.AddInputParameter(param); param = new ParameterString("Uri", allowedValues); iActionSetDevice.AddInputParameter(param); param = new ParameterString("Title", allowedValues); iActionSetDevice.AddInputParameter(param); param = new ParameterString("Description", allowedValues); iActionSetDevice.AddInputParameter(param); param = new ParameterString("ArtworkUri", allowedValues); iActionSetDevice.AddInputParameter(param); param = new ParameterBool("Shuffle"); iActionSetDevice.AddInputParameter(param); iActionSetAccount = new OpenHome.Net.Core.Action("SetAccount"); param = new ParameterUint("Index"); iActionSetAccount.AddInputParameter(param); param = new ParameterString("Mode", allowedValues); iActionSetAccount.AddInputParameter(param); param = new ParameterString("Type", allowedValues); iActionSetAccount.AddInputParameter(param); param = new ParameterString("Uri", allowedValues); iActionSetAccount.AddInputParameter(param); param = new ParameterString("Title", allowedValues); iActionSetAccount.AddInputParameter(param); param = new ParameterString("Description", allowedValues); iActionSetAccount.AddInputParameter(param); param = new ParameterString("ArtworkUri", allowedValues); iActionSetAccount.AddInputParameter(param); param = new ParameterBool("Shuffle"); iActionSetAccount.AddInputParameter(param); iActionClear = new OpenHome.Net.Core.Action("Clear"); param = new ParameterUint("Id"); iActionClear.AddInputParameter(param); iActionSwap = new OpenHome.Net.Core.Action("Swap"); param = new ParameterUint("Index1"); iActionSwap.AddInputParameter(param); param = new ParameterUint("Index2"); iActionSwap.AddInputParameter(param); iDeviceMax = new PropertyUint("DeviceMax", DeviceMaxPropertyChanged); AddProperty(iDeviceMax); iAccountMax = new PropertyUint("AccountMax", AccountMaxPropertyChanged); AddProperty(iAccountMax); iModes = new PropertyString("Modes", ModesPropertyChanged); AddProperty(iModes); iIdArray = new PropertyString("IdArray", IdArrayPropertyChanged); AddProperty(iIdArray); iPropertyLock = new Mutex(); }
/// <summary> /// Constructor for boolean output argument for an action /// </summary> /// <remarks>Intended to be created without any value. The value is later set after /// CpService.InvokeAction is called but before the invocation's callback is run)</remarks> /// <param name="aParameter">Defines the name for the argument. /// Must have been previously added to the action using Action.AddOutputParameter</param> public ArgumentBool(ParameterBool aParameter) { iHandle = ActionArgumentCreateBoolOutput(aParameter.Handle()); }
/// <summary> /// Constructor for boolean input argument for an action /// </summary> /// <remarks>Intended to be write only (its value is written on construction and not be later read)</remarks> /// <param name="aParameter">Defines the name for the argument. /// Must have been previously added to the action using Action.AddInputParameter</param> /// <param name="aValue">Value for the argument</param> public ArgumentBool(ParameterBool aParameter, bool aValue) { iHandle = ActionArgumentCreateBoolInput(aParameter.Handle(), (aValue? 1u : 0u)); }
/// <summary> /// Constructor /// </summary> /// <remarks>Use CpProxy::[Un]Subscribe() to enable/disable querying of state variable and reporting of their changes.</remarks> /// <param name="aDevice">The device to use</param> public CpProxyLinnCoUkVolkano1(ICpDevice aDevice) : base("linn-co-uk", "Volkano", 1, aDevice) { OpenHome.Net.Core.Parameter param; List <String> allowedValues = new List <String>(); iActionReboot = new OpenHome.Net.Core.Action("Reboot"); iActionBootMode = new OpenHome.Net.Core.Action("BootMode"); allowedValues.Add("Main"); allowedValues.Add("Fallback"); allowedValues.Add("Ram"); param = new ParameterString("aMode", allowedValues); iActionBootMode.AddOutputParameter(param); allowedValues.Clear(); iActionSetBootMode = new OpenHome.Net.Core.Action("SetBootMode"); allowedValues.Add("Main"); allowedValues.Add("Fallback"); param = new ParameterString("aMode", allowedValues); iActionSetBootMode.AddInputParameter(param); allowedValues.Clear(); iActionBspType = new OpenHome.Net.Core.Action("BspType"); param = new ParameterString("aBspType", allowedValues); iActionBspType.AddOutputParameter(param); iActionUglyName = new OpenHome.Net.Core.Action("UglyName"); param = new ParameterString("aUglyName", allowedValues); iActionUglyName.AddOutputParameter(param); iActionMacAddress = new OpenHome.Net.Core.Action("MacAddress"); param = new ParameterString("aMacAddress", allowedValues); iActionMacAddress.AddOutputParameter(param); iActionProductId = new OpenHome.Net.Core.Action("ProductId"); param = new ParameterString("aProductNumber", allowedValues); iActionProductId.AddOutputParameter(param); iActionBoardId = new OpenHome.Net.Core.Action("BoardId"); param = new ParameterUint("aIndex"); iActionBoardId.AddInputParameter(param); param = new ParameterString("aBoardNumber", allowedValues); iActionBoardId.AddOutputParameter(param); iActionBoardType = new OpenHome.Net.Core.Action("BoardType"); param = new ParameterUint("aIndex"); iActionBoardType.AddInputParameter(param); param = new ParameterString("aBoardNumber", allowedValues); iActionBoardType.AddOutputParameter(param); iActionMaxBoards = new OpenHome.Net.Core.Action("MaxBoards"); param = new ParameterUint("aMaxBoards"); iActionMaxBoards.AddOutputParameter(param); iActionSoftwareVersion = new OpenHome.Net.Core.Action("SoftwareVersion"); param = new ParameterString("aSoftwareVersion", allowedValues); iActionSoftwareVersion.AddOutputParameter(param); iActionSoftwareUpdate = new OpenHome.Net.Core.Action("SoftwareUpdate"); param = new ParameterBool("aAvailable"); iActionSoftwareUpdate.AddOutputParameter(param); param = new ParameterString("aSoftwareVersion", allowedValues); iActionSoftwareUpdate.AddOutputParameter(param); iActionDeviceInfo = new OpenHome.Net.Core.Action("DeviceInfo"); param = new ParameterString("aDeviceInfoXml", allowedValues); iActionDeviceInfo.AddOutputParameter(param); }
/// <summary> /// Creates a new parameter /// </summary> /// <param name="_Name"></param> /// <param name="_Type"></param> /// <returns></returns> public Parameter CreateParameter( string _Name, PARAMETER_TYPE _Type ) { Parameter Result = null; switch ( _Type ) { case PARAMETER_TYPE.BOOL: Result = new ParameterBool( this, _Name ); break; case PARAMETER_TYPE.INT: Result = new ParameterInt( this, _Name ); break; case PARAMETER_TYPE.FLOAT: Result = new ParameterFloat( this, _Name ); break; case PARAMETER_TYPE.FLOAT2: Result = new ParameterFloat2( this, _Name ); break; case PARAMETER_TYPE.FLOAT3: Result = new ParameterFloat3( this, _Name ); break; case PARAMETER_TYPE.FLOAT4: Result = new ParameterFloat4( this, _Name ); break; case PARAMETER_TYPE.MATRIX4: Result = new ParameterMatrix4( this, _Name ); break; case PARAMETER_TYPE.TEXTURE2D: Result = new ParameterTexture2D( this, _Name ); break; default: throw new Exception( "Unsupported parameter type !" ); } // Add it... m_Parameters.Add( Result ); m_Name2Parameter.Add( Result.Name, Result ); return Result; }