本文整理汇总了C#中UPnPArgument类的典型用法代码示例。如果您正苦于以下问题:C# UPnPArgument类的具体用法?C# UPnPArgument怎么用?C# UPnPArgument使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
UPnPArgument类属于命名空间,在下文中一共展示了UPnPArgument类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Error_Sink_GetTransportInfo
private void Error_Sink_GetTransportInfo(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, int Handle)
{
if(OnResult_GetTransportInfo != null)
{
OnResult_GetTransportInfo((System.UInt32 )Args[0].DataValue, (Enum_TransportState)0, (Enum_TransportStatus)0, (Enum_TransportPlaySpeed)0, e, Handle);
}
WeakReference[] w = (WeakReference[])WeakList_GetTransportInfo.ToArray(typeof(WeakReference));
foreach(WeakReference wr in w)
{
if(wr.IsAlive==true)
{
((Delegate_OnResult_GetTransportInfo)wr.Target)((System.UInt32 )Args[0].DataValue, (Enum_TransportState)0, (Enum_TransportStatus)0, (Enum_TransportPlaySpeed)0, e, Handle);
}
else
{
WeakList_GetTransportInfo.Remove(wr);
}
}
}
示例2: Sync_GetCurrentConnectionIDs
public void Sync_GetCurrentConnectionIDs(out System.String ConnectionIDs)
{
UPnPArgument[] args = new UPnPArgument[1];
args[0] = new UPnPArgument("ConnectionIDs", "");
_S.InvokeSync("GetCurrentConnectionIDs", args);
ConnectionIDs = (System.String) args[0].DataValue;
return;
}
示例3: Sink_GetCurrentConnectionIDs
private void Sink_GetCurrentConnectionIDs(UPnPService sender, string MethodName, UPnPArgument[] Args, object RetVal, int Handle)
{
if(OnResult_GetCurrentConnectionIDs != null)
{
OnResult_GetCurrentConnectionIDs((System.String )Args[0].DataValue, null, Handle);
}
WeakReference[] w = (WeakReference[])WeakList_GetCurrentConnectionIDs.ToArray(typeof(WeakReference));
foreach(WeakReference wr in w)
{
if(wr.IsAlive==true)
{
((Delegate_OnResult_GetCurrentConnectionIDs)wr.Target)((System.String )Args[0].DataValue, null, Handle);
}
else
{
WeakList_GetCurrentConnectionIDs.Remove(wr);
}
}
}
示例4: ConnectionComplete
public int ConnectionComplete(System.Int32 ConnectionID)
{
UPnPArgument[] args = new UPnPArgument[1];
args[0] = new UPnPArgument("ConnectionID", ConnectionID);
return(_S.InvokeAsync("ConnectionComplete", args, new UPnPService.UPnPServiceInvokeHandler(Sink_ConnectionComplete), new UPnPService.UPnPServiceInvokeErrorHandler(Error_Sink_ConnectionComplete)));
}
示例5: Sync_GetProtocolInfo
public void Sync_GetProtocolInfo(out System.String Source, out System.String Sink)
{
UPnPArgument[] args = new UPnPArgument[2];
args[0] = new UPnPArgument("Source", "");
args[1] = new UPnPArgument("Sink", "");
_S.InvokeSync("GetProtocolInfo", args);
Source = (System.String) args[0].DataValue;
Sink = (System.String) args[1].DataValue;
return;
}
示例6: PrepareForConnection
public int PrepareForConnection(System.String RemoteProtocolInfo, System.String PeerConnectionManager, System.Int32 PeerConnectionID, Enum_A_ARG_TYPE_Direction Direction)
{
UPnPArgument[] args = new UPnPArgument[7];
args[0] = new UPnPArgument("RemoteProtocolInfo", RemoteProtocolInfo);
args[1] = new UPnPArgument("PeerConnectionManager", PeerConnectionManager);
args[2] = new UPnPArgument("PeerConnectionID", PeerConnectionID);
switch(Direction)
{
case Enum_A_ARG_TYPE_Direction.INPUT:
args[3] = new UPnPArgument("Direction", "Input");
break;
case Enum_A_ARG_TYPE_Direction.OUTPUT:
args[3] = new UPnPArgument("Direction", "Output");
break;
default:
args[3] = new UPnPArgument("Direction", GetUnspecifiedValue("Enum_A_ARG_TYPE_Direction"));
break;
}
args[4] = new UPnPArgument("ConnectionID", "");
args[5] = new UPnPArgument("AVTransportID", "");
args[6] = new UPnPArgument("RcsID", "");
return(_S.InvokeAsync("PrepareForConnection", args, new UPnPService.UPnPServiceInvokeHandler(Sink_PrepareForConnection), new UPnPService.UPnPServiceInvokeErrorHandler(Error_Sink_PrepareForConnection)));
}
示例7: Error_Sink_PrepareForConnection
private void Error_Sink_PrepareForConnection(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, int Handle)
{
for(int i=0;i<Args.Length;++i)
{
switch(Args[i].Name)
{
case "Direction":
switch((string)Args[i].DataValue)
{
case "Input":
Args[i].DataValue = Enum_A_ARG_TYPE_Direction.INPUT;
break;
case "Output":
Args[i].DataValue = Enum_A_ARG_TYPE_Direction.OUTPUT;
break;
}
break;
}
}
if(OnResult_PrepareForConnection != null)
{
OnResult_PrepareForConnection((System.String )Args[0].DataValue, (System.String )Args[1].DataValue, (System.Int32 )Args[2].DataValue, (Enum_A_ARG_TYPE_Direction )Args[3].DataValue, (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), e, Handle);
}
WeakReference[] w = (WeakReference[])WeakList_PrepareForConnection.ToArray(typeof(WeakReference));
foreach(WeakReference wr in w)
{
if(wr.IsAlive==true)
{
((Delegate_OnResult_PrepareForConnection)wr.Target)((System.String )Args[0].DataValue, (System.String )Args[1].DataValue, (System.Int32 )Args[2].DataValue, (Enum_A_ARG_TYPE_Direction )Args[3].DataValue, (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), e, Handle);
}
else
{
WeakList_PrepareForConnection.Remove(wr);
}
}
}
示例8: Sink_GetPositionInfo
private void Sink_GetPositionInfo(UPnPService sender, string MethodName, UPnPArgument[] Args, object RetVal, int Handle)
{
if(OnResult_GetPositionInfo != null)
{
OnResult_GetPositionInfo((System.UInt32 )Args[0].DataValue, (System.UInt32 )Args[1].DataValue, (System.String )Args[2].DataValue, (System.String )Args[3].DataValue, (System.String )Args[4].DataValue, (System.String )Args[5].DataValue, (System.String )Args[6].DataValue, (System.Int32 )Args[7].DataValue, (System.Int32 )Args[8].DataValue, null, Handle);
}
WeakReference[] w = (WeakReference[])WeakList_GetPositionInfo.ToArray(typeof(WeakReference));
foreach(WeakReference wr in w)
{
if(wr.IsAlive==true)
{
((Delegate_OnResult_GetPositionInfo)wr.Target)((System.UInt32 )Args[0].DataValue, (System.UInt32 )Args[1].DataValue, (System.String )Args[2].DataValue, (System.String )Args[3].DataValue, (System.String )Args[4].DataValue, (System.String )Args[5].DataValue, (System.String )Args[6].DataValue, (System.Int32 )Args[7].DataValue, (System.Int32 )Args[8].DataValue, null, Handle);
}
else
{
WeakList_GetPositionInfo.Remove(wr);
}
}
}
示例9: Sync_Record
public void Sync_Record(System.UInt32 InstanceID)
{
UPnPArgument[] args = new UPnPArgument[1];
args[0] = new UPnPArgument("InstanceID", InstanceID);
_S.InvokeSync("Record", args);
InstanceID = (System.UInt32) args[0].DataValue;
return;
}
示例10: Sync_GetPositionInfo
public void Sync_GetPositionInfo(System.UInt32 InstanceID, out System.UInt32 Track, out System.String TrackDuration, out System.String TrackMetaData, out System.String TrackURI, out System.String RelTime, out System.String AbsTime, out System.Int32 RelCount, out System.Int32 AbsCount)
{
UPnPArgument[] args = new UPnPArgument[9];
args[0] = new UPnPArgument("InstanceID", InstanceID);
args[1] = new UPnPArgument("Track", "");
args[2] = new UPnPArgument("TrackDuration", "");
args[3] = new UPnPArgument("TrackMetaData", "");
args[4] = new UPnPArgument("TrackURI", "");
args[5] = new UPnPArgument("RelTime", "");
args[6] = new UPnPArgument("AbsTime", "");
args[7] = new UPnPArgument("RelCount", "");
args[8] = new UPnPArgument("AbsCount", "");
_S.InvokeSync("GetPositionInfo", args);
InstanceID = (System.UInt32) args[0].DataValue;
Track = (System.UInt32) args[1].DataValue;
TrackDuration = (System.String) args[2].DataValue;
TrackMetaData = (System.String) args[3].DataValue;
TrackURI = (System.String) args[4].DataValue;
RelTime = (System.String) args[5].DataValue;
AbsTime = (System.String) args[6].DataValue;
RelCount = (System.Int32) args[7].DataValue;
AbsCount = (System.Int32) args[8].DataValue;
return;
}
示例11: GetPositionInfo
public int GetPositionInfo(System.UInt32 InstanceID)
{
UPnPArgument[] args = new UPnPArgument[9];
args[0] = new UPnPArgument("InstanceID", InstanceID);
args[1] = new UPnPArgument("Track", "");
args[2] = new UPnPArgument("TrackDuration", "");
args[3] = new UPnPArgument("TrackMetaData", "");
args[4] = new UPnPArgument("TrackURI", "");
args[5] = new UPnPArgument("RelTime", "");
args[6] = new UPnPArgument("AbsTime", "");
args[7] = new UPnPArgument("RelCount", "");
args[8] = new UPnPArgument("AbsCount", "");
return(_S.InvokeAsync("GetPositionInfo", args, new UPnPService.UPnPServiceInvokeHandler(Sink_GetPositionInfo), new UPnPService.UPnPServiceInvokeErrorHandler(Error_Sink_GetPositionInfo)));
}
示例12: Error_Sink_Seek
private void Error_Sink_Seek(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, int Handle)
{
for(int i=0;i<Args.Length;++i)
{
switch(Args[i].Name)
{
case "Unit":
switch((string)Args[i].DataValue)
{
case "ABS_TIME":
Args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.ABS_TIME;
break;
case "REL_TIME":
Args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.REL_TIME;
break;
case "ABS_COUNT":
Args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.ABS_COUNT;
break;
case "REL_COUNT":
Args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.REL_COUNT;
break;
case "TRACK_NR":
Args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.TRACK_NR;
break;
case "CHANNEL_FREQ":
Args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.CHANNEL_FREQ;
break;
case "TAPE-INDEX":
Args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.TAPE_INDEX;
break;
case "FRAME":
Args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.FRAME;
break;
}
break;
}
}
if(OnResult_Seek != null)
{
OnResult_Seek((System.UInt32 )Args[0].DataValue, (Enum_A_ARG_TYPE_SeekMode )Args[1].DataValue, (System.String )Args[2].DataValue, e, Handle);
}
WeakReference[] w = (WeakReference[])WeakList_Seek.ToArray(typeof(WeakReference));
foreach(WeakReference wr in w)
{
if(wr.IsAlive==true)
{
((Delegate_OnResult_Seek)wr.Target)((System.UInt32 )Args[0].DataValue, (Enum_A_ARG_TYPE_SeekMode )Args[1].DataValue, (System.String )Args[2].DataValue, e, Handle);
}
else
{
WeakList_Seek.Remove(wr);
}
}
}
示例13: Seek
public int Seek(System.UInt32 InstanceID, Enum_A_ARG_TYPE_SeekMode Unit, System.String Target)
{
UPnPArgument[] args = new UPnPArgument[3];
args[0] = new UPnPArgument("InstanceID", InstanceID);
switch(Unit)
{
case Enum_A_ARG_TYPE_SeekMode.ABS_TIME:
args[1] = new UPnPArgument("Unit", "ABS_TIME");
break;
case Enum_A_ARG_TYPE_SeekMode.REL_TIME:
args[1] = new UPnPArgument("Unit", "REL_TIME");
break;
case Enum_A_ARG_TYPE_SeekMode.ABS_COUNT:
args[1] = new UPnPArgument("Unit", "ABS_COUNT");
break;
case Enum_A_ARG_TYPE_SeekMode.REL_COUNT:
args[1] = new UPnPArgument("Unit", "REL_COUNT");
break;
case Enum_A_ARG_TYPE_SeekMode.TRACK_NR:
args[1] = new UPnPArgument("Unit", "TRACK_NR");
break;
case Enum_A_ARG_TYPE_SeekMode.CHANNEL_FREQ:
args[1] = new UPnPArgument("Unit", "CHANNEL_FREQ");
break;
case Enum_A_ARG_TYPE_SeekMode.TAPE_INDEX:
args[1] = new UPnPArgument("Unit", "TAPE-INDEX");
break;
case Enum_A_ARG_TYPE_SeekMode.FRAME:
args[1] = new UPnPArgument("Unit", "FRAME");
break;
default:
args[1] = new UPnPArgument("Unit", GetUnspecifiedValue("Enum_A_ARG_TYPE_SeekMode"));
break;
}
args[2] = new UPnPArgument("Target", Target);
return(_S.InvokeAsync("Seek", args, new UPnPService.UPnPServiceInvokeHandler(Sink_Seek), new UPnPService.UPnPServiceInvokeErrorHandler(Error_Sink_Seek)));
}
示例14: Sync_Seek
public void Sync_Seek(System.UInt32 InstanceID, Enum_A_ARG_TYPE_SeekMode Unit, System.String Target)
{
UPnPArgument[] args = new UPnPArgument[3];
args[0] = new UPnPArgument("InstanceID", InstanceID);
switch(Unit)
{
case Enum_A_ARG_TYPE_SeekMode.ABS_TIME:
args[1] = new UPnPArgument("Unit", "ABS_TIME");
break;
case Enum_A_ARG_TYPE_SeekMode.REL_TIME:
args[1] = new UPnPArgument("Unit", "REL_TIME");
break;
case Enum_A_ARG_TYPE_SeekMode.ABS_COUNT:
args[1] = new UPnPArgument("Unit", "ABS_COUNT");
break;
case Enum_A_ARG_TYPE_SeekMode.REL_COUNT:
args[1] = new UPnPArgument("Unit", "REL_COUNT");
break;
case Enum_A_ARG_TYPE_SeekMode.TRACK_NR:
args[1] = new UPnPArgument("Unit", "TRACK_NR");
break;
case Enum_A_ARG_TYPE_SeekMode.CHANNEL_FREQ:
args[1] = new UPnPArgument("Unit", "CHANNEL_FREQ");
break;
case Enum_A_ARG_TYPE_SeekMode.TAPE_INDEX:
args[1] = new UPnPArgument("Unit", "TAPE-INDEX");
break;
case Enum_A_ARG_TYPE_SeekMode.FRAME:
args[1] = new UPnPArgument("Unit", "FRAME");
break;
default:
args[1] = new UPnPArgument("Unit", GetUnspecifiedValue("Enum_A_ARG_TYPE_SeekMode"));
break;
}
args[2] = new UPnPArgument("Target", Target);
_S.InvokeSync("Seek", args);
for(int i=0;i<args.Length;++i)
{
switch(args[i].Name)
{
case "Unit":
switch((string)args[i].DataValue)
{
case "ABS_TIME":
args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.ABS_TIME;
break;
case "REL_TIME":
args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.REL_TIME;
break;
case "ABS_COUNT":
args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.ABS_COUNT;
break;
case "REL_COUNT":
args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.REL_COUNT;
break;
case "TRACK_NR":
args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.TRACK_NR;
break;
case "CHANNEL_FREQ":
args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.CHANNEL_FREQ;
break;
case "TAPE-INDEX":
args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.TAPE_INDEX;
break;
case "FRAME":
args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.FRAME;
break;
default:
SetUnspecifiedValue("Enum_A_ARG_TYPE_SeekMode", (string)args[i].DataValue);
args[i].DataValue = Enum_A_ARG_TYPE_SeekMode._UNSPECIFIED_;
break;
}
break;
}
}
InstanceID = (System.UInt32) args[0].DataValue;
Unit = (Enum_A_ARG_TYPE_SeekMode) args[1].DataValue;
Target = (System.String) args[2].DataValue;
return;
}
示例15: Error_Sink_GetCurrentConnectionInfo
private void Error_Sink_GetCurrentConnectionInfo(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, int Handle)
{
if(OnResult_GetCurrentConnectionInfo != null)
{
OnResult_GetCurrentConnectionInfo((System.Int32 )Args[0].DataValue, (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), (Enum_A_ARG_TYPE_Direction)0, (Enum_A_ARG_TYPE_ConnectionStatus)0, e, Handle);
}
WeakReference[] w = (WeakReference[])WeakList_GetCurrentConnectionInfo.ToArray(typeof(WeakReference));
foreach(WeakReference wr in w)
{
if(wr.IsAlive==true)
{
((Delegate_OnResult_GetCurrentConnectionInfo)wr.Target)((System.Int32 )Args[0].DataValue, (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), (Enum_A_ARG_TYPE_Direction)0, (Enum_A_ARG_TYPE_ConnectionStatus)0, e, Handle);
}
else
{
WeakList_GetCurrentConnectionInfo.Remove(wr);
}
}
}