本文整理汇总了C#中OpenSource.UPnP.UPnPInvokeException类的典型用法代码示例。如果您正苦于以下问题:C# UPnPInvokeException类的具体用法?C# UPnPInvokeException怎么用?C# UPnPInvokeException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UPnPInvokeException类属于OpenSource.UPnP命名空间,在下文中一共展示了UPnPInvokeException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetDocumentSink
private void GetDocumentSink(CpGateKeeper sender, System.String DeviceUDN, System.String ServiceID, System.Byte[] Document, UPnPInvokeException e, object _Tag)
{
if(e!=null) return;
UTF8Encoding U = new UTF8Encoding();
string XML = U.GetString(Document);
UPnPService S = (UPnPService)_Tag;
(new UPnPDebugObject(S)).InvokeNonStaticMethod("ParseSCPD",new object[1]{XML});
--Counter;
if(Counter==0)
{
if(OnDevice!=null) OnDevice(this,new UPnPRelayDevice(_D,HOME));
}
}
示例2: CPGetDocumentSink
private void CPGetDocumentSink(CpGateKeeper sender, System.String DeviceUDN, System.String ServiceID, System.Byte[] Document, UPnPInvokeException e, object _Tag)
{
if(e!=null) return;
UTF8Encoding U = new UTF8Encoding();
string XML = U.GetString(Document);
Uri SourceUri = new Uri("http://127.0.0.1");
IPAddress Intfce = null;
UPnPDevice d = (UPnPDevice)(new UPnPDebugObject(typeof(OpenSource.UPnP.UPnPDevice))).InvokeStaticMethod("Parse",new object[3]
{XML,SourceUri,Intfce});
ProxyDeviceFactory df = new ProxyDeviceFactory(sender,d,new ProxyDeviceFactory.OnDeviceHandler(NewDeviceSink));
ProxyFactoryTable[df] = df;
}
示例3: Error_Sink_SetVerticalKeystone
private void Error_Sink_SetVerticalKeystone(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, int Handle)
{
if(OnResult_SetVerticalKeystone != null)
{
OnResult_SetVerticalKeystone((System.UInt32 )Args[0].DataValue, (System.Int16 )Args[1].DataValue, e, Handle);
}
WeakReference[] w = (WeakReference[])WeakList_SetVerticalKeystone.ToArray(typeof(WeakReference));
foreach(WeakReference wr in w)
{
if(wr.IsAlive==true)
{
((Delegate_OnResult_SetVerticalKeystone)wr.Target)((System.UInt32 )Args[0].DataValue, (System.Int16 )Args[1].DataValue, e, Handle);
}
else
{
WeakList_SetVerticalKeystone.Remove(wr);
}
}
}
示例4: Error_Sink_SelectPreset
private void Error_Sink_SelectPreset(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, int Handle)
{
for(int i=0;i<Args.Length;++i)
{
switch(Args[i].Name)
{
case "PresetName":
switch((string)Args[i].DataValue)
{
case "FactoryDefaults":
Args[i].DataValue = Enum_A_ARG_TYPE_PresetName.FACTORYDEFAULTS;
break;
case "InstallationDefaults":
Args[i].DataValue = Enum_A_ARG_TYPE_PresetName.INSTALLATIONDEFAULTS;
break;
case "Vendor defined":
Args[i].DataValue = Enum_A_ARG_TYPE_PresetName.VENDOR_DEFINED;
break;
}
break;
}
}
if(OnResult_SelectPreset != null)
{
OnResult_SelectPreset((System.UInt32 )Args[0].DataValue, (Enum_A_ARG_TYPE_PresetName )Args[1].DataValue, e, Handle);
}
WeakReference[] w = (WeakReference[])WeakList_SelectPreset.ToArray(typeof(WeakReference));
foreach(WeakReference wr in w)
{
if(wr.IsAlive==true)
{
((Delegate_OnResult_SelectPreset)wr.Target)((System.UInt32 )Args[0].DataValue, (Enum_A_ARG_TYPE_PresetName )Args[1].DataValue, e, Handle);
}
else
{
WeakList_SelectPreset.Remove(wr);
}
}
}
示例5: ResultImportResource2SinkEx
private void ResultImportResource2SinkEx(System.Uri importFromThis, IUPnPMedia owner, IMediaResource importToThis, IResourceTransfer transferObject, object Tag, UPnPInvokeException error)
{
new TransferForm(transferObject).Show();
}
示例6: ResultDestroyObjectSink
private void ResultDestroyObjectSink(ICpMedia destroyThis, object Tag, UPnPInvokeException error)
{
MessageBox.Show(this, "Media " + destroyThis.Title + " Deleted","Delete Media");
}
示例7: OnBrowseDone
/// <summary>
/// Processes the results of Browse requests.
/// </summary>
/// <param name="sender"></param>
/// <param name="ObjectID"></param>
/// <param name="BrowseFlag"></param>
/// <param name="Filter"></param>
/// <param name="StartingIndex"></param>
/// <param name="RequestedCount"></param>
/// <param name="SortCriteria"></param>
/// <param name="Result"></param>
/// <param name="NumberReturned"></param>
/// <param name="TotalMatches"></param>
/// <param name="UpdateID"></param>
/// <param name="e"></param>
/// <param name="_Tag"></param>
private void OnBrowseDone(CpContentDirectory sender, System.String ObjectID, OpenSource.UPnP.AV.CpContentDirectory.Enum_A_ARG_TYPE_BrowseFlag BrowseFlag, System.String Filter, System.UInt32 StartingIndex, System.UInt32 RequestedCount, System.String SortCriteria, System.String Result, System.UInt32 NumberReturned, System.UInt32 TotalMatches, System.UInt32 UpdateID, UPnPInvokeException e, object _Tag)
{
_RequestState state = (_RequestState) _Tag;
if (e != null)
{
if (state.Callback_Browse1 != null)
{
state.Callback_Browse1(this, ObjectID, BrowseFlag, Filter, StartingIndex, RequestedCount, SortCriteria, e, null, state.Tag, null, NumberReturned, TotalMatches, UpdateID);
}
else if (state.Callback_Browse2 != null)
{
state.Callback_Browse2(this, e, null, state.Tag, null, NumberReturned, TotalMatches, UpdateID);
}
}
else
{
ArrayList al = null;
try
{
al = CpMediaBuilder.BuildMediaBranches(Result);
}
catch (Exception parseError)
{
if (state.Callback_Browse1 != null)
{
state.Callback_Browse1(this, ObjectID, BrowseFlag, Filter, StartingIndex, RequestedCount, SortCriteria, e, parseError, state.Tag, null, NumberReturned, TotalMatches, UpdateID);
}
else if (state.Callback_Browse2 != null)
{
state.Callback_Browse2(this, e, parseError, state.Tag, null, NumberReturned, TotalMatches, UpdateID);
}
al = null;
}
if (al != null)
{
if (state.Callback_Browse1 != null)
{
state.Callback_Browse1(this, ObjectID, BrowseFlag, Filter, StartingIndex, RequestedCount, SortCriteria, e, null, state.Tag, (IUPnPMedia[]) al.ToArray(typeof(IUPnPMedia)), NumberReturned, TotalMatches, UpdateID);
}
else if (state.Callback_Browse2 != null)
{
state.Callback_Browse2(this, e, null, state.Tag, (IUPnPMedia[]) al.ToArray(typeof(IUPnPMedia)), NumberReturned, TotalMatches, UpdateID);
}
}
}
}
示例8: Error_Sink_GetProtocolInfo
private void Error_Sink_GetProtocolInfo(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, int Handle)
{
if(OnResult_GetProtocolInfo != null)
{
OnResult_GetProtocolInfo((System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), e, Handle);
}
WeakReference[] w = (WeakReference[])WeakList_GetProtocolInfo.ToArray(typeof(WeakReference));
foreach(WeakReference wr in w)
{
if(wr.IsAlive==true)
{
((Delegate_OnResult_GetProtocolInfo)wr.Target)((System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), e, Handle);
}
else
{
WeakList_GetProtocolInfo.Remove(wr);
}
}
}
示例9: Error_Sink_Play
private void Error_Sink_Play(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, object _Tag)
{
for(int i=0;i<Args.Length;++i)
{
switch(Args[i].Name)
{
case "Speed":
switch((string)Args[i].DataValue)
{
case "1":
Args[i].DataValue = Enum_TransportPlaySpeed._1;
break;
case " vendor-defined ":
Args[i].DataValue = Enum_TransportPlaySpeed._VENDOR_DEFINED_;
break;
}
break;
}
}
object[] StateInfo = (object[])_Tag;
if (StateInfo[1]!=null)
{
((Delegate_OnResult_Play)StateInfo[1])(this, (System.UInt32 )Args[0].DataValue, (Enum_TransportPlaySpeed )Args[1].DataValue, e, StateInfo[0]);
}
else
{
OnResult_Play_Event.Fire(this, (System.UInt32 )Args[0].DataValue, (Enum_TransportPlaySpeed )Args[1].DataValue, e, StateInfo[0]);
}
}
示例10: Error_Sink_GetTransportSettings
private void Error_Sink_GetTransportSettings(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, object _Tag)
{
object[] StateInfo = (object[])_Tag;
if (StateInfo[1]!=null)
{
((Delegate_OnResult_GetTransportSettings)StateInfo[1])(this, (System.UInt32 )Args[0].DataValue, (Enum_CurrentPlayMode)0, (Enum_CurrentRecordQualityMode)0, e, StateInfo[0]);
}
else
{
OnResult_GetTransportSettings_Event.Fire(this, (System.UInt32 )Args[0].DataValue, (Enum_CurrentPlayMode)0, (Enum_CurrentRecordQualityMode)0, e, StateInfo[0]);
}
}
示例11: Error_Sink_GetTransportInfo
private void Error_Sink_GetTransportInfo(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, object _Tag)
{
object[] StateInfo = (object[])_Tag;
if (StateInfo[1]!=null)
{
((Delegate_OnResult_GetTransportInfo)StateInfo[1])(this, (System.UInt32 )Args[0].DataValue, (Enum_TransportState)0, (Enum_TransportStatus)0, (Enum_TransportPlaySpeed)0, e, StateInfo[0]);
}
else
{
OnResult_GetTransportInfo_Event.Fire(this, (System.UInt32 )Args[0].DataValue, (Enum_TransportState)0, (Enum_TransportStatus)0, (Enum_TransportPlaySpeed)0, e, StateInfo[0]);
}
}
示例12: Error_Sink_GetMediaInfo
private void Error_Sink_GetMediaInfo(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, object _Tag)
{
object[] StateInfo = (object[])_Tag;
if (StateInfo[1]!=null)
{
((Delegate_OnResult_GetMediaInfo)StateInfo[1])(this, (System.UInt32 )Args[0].DataValue, (System.UInt32)UPnPService.CreateObjectInstance(typeof(System.UInt32),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (Enum_PlaybackStorageMedium)0, (Enum_RecordStorageMedium)0, (Enum_RecordMediumWriteStatus)0, e, StateInfo[0]);
}
else
{
OnResult_GetMediaInfo_Event.Fire(this, (System.UInt32 )Args[0].DataValue, (System.UInt32)UPnPService.CreateObjectInstance(typeof(System.UInt32),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (Enum_PlaybackStorageMedium)0, (Enum_RecordStorageMedium)0, (Enum_RecordMediumWriteStatus)0, e, StateInfo[0]);
}
}
示例13: InvokeFailedSink
private void InvokeFailedSink(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, object Tag)
{
Arguments = Args;
InvokeException = e;
Result.Set();
}
示例14: Error_Sink_GetIPAddress
private void Error_Sink_GetIPAddress(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, object _Tag)
{
object[] StateInfo = (object[])_Tag;
if (StateInfo[1]!=null)
{
((Delegate_OnResult_GetIPAddress)StateInfo[1])(this, (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), e, StateInfo[0]);
}
else
{
OnResult_GetIPAddress_Event.Fire(this, (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), e, StateInfo[0]);
}
}
示例15: Error_Sink_SetVolumeDB
private void Error_Sink_SetVolumeDB(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, object _Tag)
{
for(int i=0;i<Args.Length;++i)
{
switch(Args[i].Name)
{
case "Channel":
switch((string)Args[i].DataValue)
{
case "Master":
Args[i].DataValue = Enum_A_ARG_TYPE_Channel.MASTER;
break;
case "LF":
Args[i].DataValue = Enum_A_ARG_TYPE_Channel.LF;
break;
case "RF":
Args[i].DataValue = Enum_A_ARG_TYPE_Channel.RF;
break;
}
break;
}
}
object[] StateInfo = (object[])_Tag;
if (StateInfo[1]!=null)
{
((Delegate_OnResult_SetVolumeDB)StateInfo[1])(this, (System.UInt32 )Args[0].DataValue, (Enum_A_ARG_TYPE_Channel )Args[1].DataValue, (System.Int16 )Args[2].DataValue, e, StateInfo[0]);
}
else
{
OnResult_SetVolumeDB_Event.Fire(this, (System.UInt32 )Args[0].DataValue, (Enum_A_ARG_TYPE_Channel )Args[1].DataValue, (System.Int16 )Args[2].DataValue, e, StateInfo[0]);
}
}