本文整理汇总了C#中OpenHome.Net.Core.Action类的典型用法代码示例。如果您正苦于以下问题:C# Action类的具体用法?C# Action怎么用?C# Action使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Action类属于OpenHome.Net.Core命名空间,在下文中一共展示了Action类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CpProxyAvOpenhomeOrgNetworkMonitor1
/// <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 CpProxyAvOpenhomeOrgNetworkMonitor1(CpDevice aDevice)
: base("av-openhome-org", "NetworkMonitor", 1, aDevice)
{
OpenHome.Net.Core.Parameter param;
List<String> allowedValues = new List<String>();
iActionName = new OpenHome.Net.Core.Action("Name");
param = new ParameterString("Name", allowedValues);
iActionName.AddOutputParameter(param);
iActionPorts = new OpenHome.Net.Core.Action("Ports");
param = new ParameterUint("Sender");
iActionPorts.AddOutputParameter(param);
param = new ParameterUint("Receiver");
iActionPorts.AddOutputParameter(param);
param = new ParameterUint("Results");
iActionPorts.AddOutputParameter(param);
iName = new PropertyString("Name", NamePropertyChanged);
AddProperty(iName);
iSender = new PropertyUint("Sender", SenderPropertyChanged);
AddProperty(iSender);
iReceiver = new PropertyUint("Receiver", ReceiverPropertyChanged);
AddProperty(iReceiver);
iResults = new PropertyUint("Results", ResultsPropertyChanged);
AddProperty(iResults);
iPropertyLock = new Mutex();
}
示例2: EnableActionGetColor
/// <summary>
/// Signal that the action GetColor is supported.
/// </summary>
/// <remarks>The action's availability will be published in the device's service.xml.
/// GetColor must be overridden if this is called.</remarks>
protected void EnableActionGetColor()
{
OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("GetColor");
action.AddInputParameter(new ParameterUint("Index"));
action.AddOutputParameter(new ParameterUint("Color"));
iDelegateGetColor = new ActionDelegate(DoGetColor);
EnableAction(action, iDelegateGetColor, GCHandle.ToIntPtr(iGch));
}
示例3: EnableActionUnsubscribe
/// <summary>
/// Signal that the action Unsubscribe is supported.
/// </summary>
/// <remarks>The action's availability will be published in the device's service.xml.
/// Unsubscribe must be overridden if this is called.</remarks>
protected void EnableActionUnsubscribe()
{
OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("Unsubscribe");
List<String> allowedValues = new List<String>();
action.AddInputParameter(new ParameterString("Sid", allowedValues));
iDelegateUnsubscribe = new ActionDelegate(DoUnsubscribe);
EnableAction(action, iDelegateUnsubscribe, GCHandle.ToIntPtr(iGch));
}
示例4: EnableActionGetPropertyUpdates
/// <summary>
/// Signal that the action GetPropertyUpdates is supported.
/// </summary>
/// <remarks>The action's availability will be published in the device's service.xml.
/// GetPropertyUpdates must be overridden if this is called.</remarks>
protected void EnableActionGetPropertyUpdates()
{
OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("GetPropertyUpdates");
List<String> allowedValues = new List<String>();
action.AddInputParameter(new ParameterString("ClientId", allowedValues));
action.AddOutputParameter(new ParameterString("Updates", allowedValues));
iDelegateGetPropertyUpdates = new ActionDelegate(DoGetPropertyUpdates);
EnableAction(action, iDelegateGetPropertyUpdates, GCHandle.ToIntPtr(iGch));
}
示例5: EnableActionRenew
/// <summary>
/// Signal that the action Renew is supported.
/// </summary>
/// <remarks>The action's availability will be published in the device's service.xml.
/// Renew must be overridden if this is called.</remarks>
protected void EnableActionRenew()
{
OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("Renew");
List<String> allowedValues = new List<String>();
action.AddInputParameter(new ParameterString("Sid", allowedValues));
action.AddInputParameter(new ParameterUint("RequestedDuration"));
action.AddOutputParameter(new ParameterUint("Duration"));
iDelegateRenew = new ActionDelegate(DoRenew);
EnableAction(action, iDelegateRenew, GCHandle.ToIntPtr(iGch));
}
示例6: EnableActionGetColorComponents
/// <summary>
/// Signal that the action GetColorComponents is supported.
/// </summary>
/// <remarks>The action's availability will be published in the device's service.xml.
/// GetColorComponents must be overridden if this is called.</remarks>
protected void EnableActionGetColorComponents()
{
OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("GetColorComponents");
action.AddInputParameter(new ParameterUint("Color"));
action.AddOutputParameter(new ParameterUint("Brightness"));
action.AddOutputParameter(new ParameterUint("Red"));
action.AddOutputParameter(new ParameterUint("Green"));
action.AddOutputParameter(new ParameterUint("Blue"));
iDelegateGetColorComponents = new ActionDelegate(DoGetColorComponents);
EnableAction(action, iDelegateGetColorComponents, GCHandle.ToIntPtr(iGch));
}
示例7: EnableActionSubscribe
/// <summary>
/// Signal that the action Subscribe is supported.
/// </summary>
/// <remarks>The action's availability will be published in the device's service.xml.
/// Subscribe must be overridden if this is called.</remarks>
protected void EnableActionSubscribe()
{
OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("Subscribe");
List<String> allowedValues = new List<String>();
action.AddInputParameter(new ParameterString("ClientId", allowedValues));
action.AddInputParameter(new ParameterString("Udn", allowedValues));
action.AddInputParameter(new ParameterString("Service", allowedValues));
action.AddInputParameter(new ParameterUint("RequestedDuration"));
action.AddOutputParameter(new ParameterString("Sid", allowedValues));
action.AddOutputParameter(new ParameterUint("Duration"));
iDelegateSubscribe = new ActionDelegate(DoSubscribe);
EnableAction(action, iDelegateSubscribe, GCHandle.ToIntPtr(iGch));
}
示例8: CpProxyOpenhomeOrgTestDimmableLight1
/// <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 CpProxyOpenhomeOrgTestDimmableLight1(CpDevice aDevice)
: base("openhome-org", "TestDimmableLight", 1, aDevice)
{
OpenHome.Net.Core.Parameter param;
iActionGetLevel = new OpenHome.Net.Core.Action("GetLevel");
param = new ParameterUint("Level");
iActionGetLevel.AddOutputParameter(param);
iActionSetLevel = new OpenHome.Net.Core.Action("SetLevel");
param = new ParameterUint("Level");
iActionSetLevel.AddInputParameter(param);
iA_ARG_Level = new PropertyUint("A_ARG_Level", A_ARG_LevelPropertyChanged);
AddProperty(iA_ARG_Level);
iPropertyLock = new Mutex();
}
示例9: CpProxyUpnpOrgSwitchPower1
/// <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(CpDevice 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();
}
示例10: CpProxyAvOpenhomeOrgTime1
/// <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 CpProxyAvOpenhomeOrgTime1(CpDevice aDevice)
: base("av-openhome-org", "Time", 1, aDevice)
{
OpenHome.Net.Core.Parameter param;
iActionTime = new OpenHome.Net.Core.Action("Time");
param = new ParameterUint("TrackCount");
iActionTime.AddOutputParameter(param);
param = new ParameterUint("Duration");
iActionTime.AddOutputParameter(param);
param = new ParameterUint("Seconds");
iActionTime.AddOutputParameter(param);
iTrackCount = new PropertyUint("TrackCount", TrackCountPropertyChanged);
AddProperty(iTrackCount);
iDuration = new PropertyUint("Duration", DurationPropertyChanged);
AddProperty(iDuration);
iSeconds = new PropertyUint("Seconds", SecondsPropertyChanged);
AddProperty(iSeconds);
iPropertyLock = new Mutex();
}
示例11: CpProxyOpenhomeOrgSubscriptionLongPoll1
/// <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 CpProxyOpenhomeOrgSubscriptionLongPoll1(CpDevice aDevice)
: base("openhome-org", "SubscriptionLongPoll", 1, aDevice)
{
OpenHome.Net.Core.Parameter param;
List<String> allowedValues = new List<String>();
iActionSubscribe = new OpenHome.Net.Core.Action("Subscribe");
param = new ParameterString("ClientId", allowedValues);
iActionSubscribe.AddInputParameter(param);
param = new ParameterString("Udn", allowedValues);
iActionSubscribe.AddInputParameter(param);
param = new ParameterString("Service", allowedValues);
iActionSubscribe.AddInputParameter(param);
param = new ParameterUint("RequestedDuration");
iActionSubscribe.AddInputParameter(param);
param = new ParameterString("Sid", allowedValues);
iActionSubscribe.AddOutputParameter(param);
param = new ParameterUint("Duration");
iActionSubscribe.AddOutputParameter(param);
iActionUnsubscribe = new OpenHome.Net.Core.Action("Unsubscribe");
param = new ParameterString("Sid", allowedValues);
iActionUnsubscribe.AddInputParameter(param);
iActionRenew = new OpenHome.Net.Core.Action("Renew");
param = new ParameterString("Sid", allowedValues);
iActionRenew.AddInputParameter(param);
param = new ParameterUint("RequestedDuration");
iActionRenew.AddInputParameter(param);
param = new ParameterUint("Duration");
iActionRenew.AddOutputParameter(param);
iActionGetPropertyUpdates = new OpenHome.Net.Core.Action("GetPropertyUpdates");
param = new ParameterString("ClientId", allowedValues);
iActionGetPropertyUpdates.AddInputParameter(param);
param = new ParameterString("Updates", allowedValues);
iActionGetPropertyUpdates.AddOutputParameter(param);
}
示例12: EnableActionSetColorTemperature
/// <summary>
/// Signal that the action SetColorTemperature is supported.
/// </summary>
/// <remarks>The action's availability will be published in the device's service.xml.
/// SetColorTemperature must be overridden if this is called.</remarks>
protected void EnableActionSetColorTemperature()
{
OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("SetColorTemperature");
action.AddInputParameter(new ParameterUint("InstanceID"));
action.AddInputParameter(new ParameterUint("DesiredColorTemperature", 0, 2147483647, 1));
iDelegateSetColorTemperature = new ActionDelegate(DoSetColorTemperature);
EnableAction(action, iDelegateSetColorTemperature, GCHandle.ToIntPtr(iGch));
}
示例13: EnableActionSetGreenVideoBlackLevel
/// <summary>
/// Signal that the action SetGreenVideoBlackLevel is supported.
/// </summary>
/// <remarks>The action's availability will be published in the device's service.xml.
/// SetGreenVideoBlackLevel must be overridden if this is called.</remarks>
protected void EnableActionSetGreenVideoBlackLevel()
{
OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("SetGreenVideoBlackLevel");
action.AddInputParameter(new ParameterUint("InstanceID"));
action.AddInputParameter(new ParameterUint("DesiredGreenVideoBlackLevel", 0, 2147483647, 1));
iDelegateSetGreenVideoBlackLevel = new ActionDelegate(DoSetGreenVideoBlackLevel);
EnableAction(action, iDelegateSetGreenVideoBlackLevel, GCHandle.ToIntPtr(iGch));
}
示例14: EnableActionListPresets
/// <summary>
/// Signal that the action ListPresets is supported.
/// </summary>
/// <remarks>The action's availability will be published in the device's service.xml.
/// ListPresets must be overridden if this is called.</remarks>
protected void EnableActionListPresets()
{
OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("ListPresets");
List<String> allowedValues = new List<String>();
action.AddInputParameter(new ParameterUint("InstanceID"));
action.AddOutputParameter(new ParameterString("CurrentPresetNameList", allowedValues));
iDelegateListPresets = new ActionDelegate(DoListPresets);
EnableAction(action, iDelegateListPresets, GCHandle.ToIntPtr(iGch));
}
示例15: EnableActionSelectPreset
/// <summary>
/// Signal that the action SelectPreset is supported.
/// </summary>
/// <remarks>The action's availability will be published in the device's service.xml.
/// SelectPreset must be overridden if this is called.</remarks>
protected void EnableActionSelectPreset()
{
OpenHome.Net.Core.Action action = new OpenHome.Net.Core.Action("SelectPreset");
List<String> allowedValues = new List<String>();
action.AddInputParameter(new ParameterUint("InstanceID"));
action.AddInputParameter(new ParameterString("PresetName", allowedValues));
iDelegateSelectPreset = new ActionDelegate(DoSelectPreset);
EnableAction(action, iDelegateSelectPreset, GCHandle.ToIntPtr(iGch));
}