本文整理汇总了C#中CallType类的典型用法代码示例。如果您正苦于以下问题:C# CallType类的具体用法?C# CallType怎么用?C# CallType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CallType类属于命名空间,在下文中一共展示了CallType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: switch
// Perform a late bound call.
public static Object CallByName
(Object ObjectRef, String ProcName,
CallType UseCallType, Object[] Args)
{
switch(UseCallType)
{
case CallType.Method:
{
return LateBinding.LateCallWithResult
(ObjectRef, null, ProcName, Args, null, null);
}
// Not reached.
case CallType.Get:
{
return LateBinding.LateGet
(ObjectRef, null, ProcName, Args, null, null);
}
// Not reached.
case CallType.Set:
case CallType.Let:
{
LateBinding.LateSet
(ObjectRef, null, ProcName, Args, null);
return null;
}
// Not reached.
}
throw new ArgumentException(S._("VB_InvalidCallType"));
}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:32,代码来源:Interaction.cs
示例2: InitMessage
internal void InitMessage (MonoMethod method, object [] out_args)
{
this.method = method;
ParameterInfo[] paramInfo = method.GetParametersInternal ();
int param_count = paramInfo.Length;
args = new object[param_count];
arg_types = new byte[param_count];
asyncResult = null;
call_type = CallType.Sync;
names = new string[param_count];
for (int i = 0; i < param_count; i++) {
names[i] = paramInfo[i].Name;
}
bool hasOutArgs = out_args != null;
int j = 0;
for (int i = 0; i < param_count; i++) {
byte arg_type;
bool isOut = paramInfo[i].IsOut;
if (paramInfo[i].ParameterType.IsByRef) {
if (hasOutArgs)
args[i] = out_args[j++];
arg_type = 2; // OUT
if (!isOut)
arg_type |= 1; // INOUT
} else {
arg_type = 1; // IN
if (isOut)
arg_type |= 4; // IN, COPY OUT
}
arg_types[i] = arg_type;
}
}
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:32,代码来源:MonoMethodMessage.cs
示例3: Call
public override ICallControl Call(string phoneNumber, CallType type)
{
if (CallType.Voice.Equals (type)) {
using (var pool = new NSAutoreleasePool ()) {
StringBuilder filteredPhoneNumber = new StringBuilder();
if (phoneNumber!=null && phoneNumber.Length>0) {
foreach (char c in phoneNumber) {
if (Char.IsNumber(c) || c == '+' || c == '-' || c == '.') {
filteredPhoneNumber.Append(c);
}
}
}
String textURI = "tel:" + filteredPhoneNumber.ToString();
var thread = new Thread (InitiateCall);
thread.Start (textURI);
}
;
} else {
INotification notificationService = (INotification)IPhoneServiceLocator.GetInstance ().GetService ("notify");
if (notificationService != null) {
notificationService.StartNotifyAlert ("Phone Alert", "The requested call type is not enabled or supported on this device.", "OK");
}
}
return null;
}
开发者ID:jioe,项目名称:appverse-mobile,代码行数:25,代码来源:IPhoneTelephony.cs
示例4: AddCallCodes2
public static void AddCallCodes2(
OpModule codes, NodeBase[] args, CallType type, Action delg)
{
for (int i = args.Length - 1; i >= 0; i--)
args[i].AddCodesV(codes, "push", null);
delg();
if (type == CallType.CDecl && args.Length > 0)
{
int p = 4;
bool pop = false;
for (int i = 0; i < args.Length; i++)
{
var arg = args[i];
if (OpModule.NeedsDtor(arg))
{
if (!pop)
{
codes.Add(I386.Push(Reg32.EAX));
pop = true;
}
arg.Type.AddDestructorA(codes, Addr32.NewRO(Reg32.ESP, p));
}
p += 4;
}
if (pop) codes.Add(I386.Pop(Reg32.EAX));
codes.Add(I386.AddR(Reg32.ESP, Val32.New((byte)(args.Length * 4))));
}
}
开发者ID:7shi,项目名称:LLPML,代码行数:28,代码来源:Call.cs
示例5: Call
public Call(DateTime startCall, DateTime endCall, string phoneNumber, CallType callType = CallType.Dailed)
{
this.startCallDateTime = startCall;
this.endCallDateTime = endCall;
this.phoneNumber = phoneNumber;
this.PhoneCallType = callType;
}
开发者ID:kizisoft,项目名称:TelerikAcademy,代码行数:7,代码来源:Call.cs
示例6: CallByName
public static object CallByName(object Instance, string MethodName, CallType UseCallType, params object[] Arguments)
{
switch (UseCallType)
{
case CallType.Method:
return NewLateBinding.LateCall(Instance, null, MethodName, Arguments, null, null, null, false);
case CallType.Get:
return NewLateBinding.LateGet(Instance, null, MethodName, Arguments, null, null, null);
case CallType.Let:
case CallType.Set:
{
IDynamicMetaObjectProvider instance = IDOUtils.TryCastToIDMOP(Instance);
if (instance == null)
{
NewLateBinding.LateSet(Instance, null, MethodName, Arguments, null, null, false, false, UseCallType);
break;
}
IDOBinder.IDOSet(instance, MethodName, null, Arguments);
break;
}
default:
throw new ArgumentException(Utils.GetResourceString("Argument_InvalidValue1", new string[] { "CallType" }));
}
return null;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:27,代码来源:Versioned.cs
示例7: MakeHttpRequest
void MakeHttpRequest(string remoteUrl, CallType callType, NameValueCollection headers, byte[] buffer)
{
headers[HeaderMapper.NServiceBus + HeaderMapper.CallType] = Enum.GetName(typeof(CallType), callType);
headers[HttpHeaders.ContentMd5Key] = Hasher.Hash(buffer);
headers["NServiceBus.Gateway"] = "true";
headers[HttpHeaders.FromKey] = ListenUrl;
var request = WebRequest.Create(remoteUrl);
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.Headers = Encode(headers);
request.ContentLength = buffer.Length;
var stream = request.GetRequestStream();
stream.Write(buffer, 0, buffer.Length);
Logger.DebugFormat("Sending message - {0} to: {1}", callType, remoteUrl);
int statusCode;
using (var response = request.GetResponse() as HttpWebResponse)
statusCode = (int)response.StatusCode;
Logger.Debug("Got HTTP response with status code " + statusCode);
if (statusCode != 200)
{
Logger.Warn("Message not transferred successfully. Trying again...");
throw new Exception("Retrying");
}
}
开发者ID:kblooie,项目名称:NServiceBus,代码行数:33,代码来源:HttpChannelSender.cs
示例8: CallByName
/// <summary>
/// Allows late bound invocation of
/// properties and methods.
/// </summary>
/// <param name="target">Object implementing the property or method.</param>
/// <param name="methodName">Name of the property or method.</param>
/// <param name="callType">Specifies how to invoke the property or method.</param>
/// <param name="args">List of arguments to pass to the method.</param>
/// <returns>The result of the property or method invocation.</returns>
public static object CallByName(
object target, string methodName, CallType callType,
params object[] args)
{
switch (callType)
{
case CallType.Get:
{
PropertyInfo p = target.GetType().GetProperty(methodName);
return p.GetValue(target, args);
}
case CallType.Let:
case CallType.Set:
{
PropertyInfo p = target.GetType().GetProperty(methodName);
object[] index = null;
if (args.Length > 1)
{
index = new object[args.Length - 1];
args.CopyTo(index, 1);
}
p.SetValue(target, args[0], index);
return null;
}
case CallType.Method:
{
MethodInfo m = target.GetType().GetMethod(methodName);
return m.Invoke(target, args);
}
}
return null;
}
开发者ID:gbahns,项目名称:Tennis,代码行数:41,代码来源:Utilities.cs
示例9: AbstractCall
public AbstractValue AbstractCall(CallType callType, IList<AbstractValue> args) {
TargetSet ts = this.GetTargetSet(args.Count);
if (ts != null) {
return ts.AbstractCall(callType, args);
} else {
return AbstractValue.TypeError(BadArgumentCount(callType, args.Count).Message);
}
}
开发者ID:JamesTryand,项目名称:IronScheme,代码行数:8,代码来源:MethodBinder.cs
示例10: ReportRecord
public ReportRecord(CallType callType, int number, DateTime date, DateTime time, int cost)
{
CallType = callType;
Number = number;
Date = date;
Time = time;
Cost = cost;
}
开发者ID:ZalesskyMaxim,项目名称:Task3,代码行数:8,代码来源:ReportRecord.cs
示例11: New
public static TypeDelegate New(
BlockBase parent, CallType callType, TypeBase retType, VarDeclare[] args)
{
var ret = new TypeDelegate();
ret.init(callType, retType, args);
ret.Parent = parent;
return ret;
}
开发者ID:7shi,项目名称:LLPML,代码行数:8,代码来源:TypeFunction.cs
示例12: MakeBindingTarget
public MethodCandidate MakeBindingTarget(CallType callType, Type[] types, out Type[] argumentTests) {
TargetSet ts = GetTargetSet(types.Length);
if (ts != null) {
return ts.MakeBindingTarget(callType, types, _kwArgs, out argumentTests);
}
argumentTests = null;
return null;
}
开发者ID:JamesTryand,项目名称:IronScheme,代码行数:8,代码来源:MethodBinder.cs
示例13: Transmit
void Transmit(IChannelSender channelSender, Site targetSite, CallType callType, IDictionary<string,string> headers, Stream data)
{
headers[HeaderMapper.NServiceBus + HeaderMapper.CallType] = Enum.GetName(typeof(CallType), callType);
headers[HttpHeaders.ContentMd5Key] = Hasher.Hash(data);
Logger.DebugFormat("Sending message - {0} to: {1}", callType, targetSite.Address);
channelSender.Send(targetSite.Address, headers, data);
}
开发者ID:Jpattom,项目名称:NServiceBus,代码行数:9,代码来源:IdempotentSender.cs
示例14: Call
public override async Task Call(string number, CallType type)
{
if (String.IsNullOrWhiteSpace(number) || type != CallType.Voice) return;
if (
!number.All(
character => char.IsDigit(character) || character == '+' || character == '*' || character == '#' || character == ' '))
return;
if (AppverseBridge.Instance.RuntimeHandler.Webview.Dispatcher.HasThreadAccess) PhoneCallManager.ShowPhoneCallUI(number, String.Empty);
else await AppverseBridge.Instance.RuntimeHandler.Webview.Dispatcher.RunAsync(CoreDispatcherPriority.High, () => PhoneCallManager.ShowPhoneCallUI(number, String.Empty));
}
开发者ID:Appverse,项目名称:appverse-mobile,代码行数:10,代码来源:WindowsPhoneTelephony.cs
示例15: Transmit
void Transmit(IChannelSender channelSender, Site targetSite, CallType callType,
IDictionary<string, string> headers, Stream data)
{
headers[GatewayHeaders.IsGatewayMessage] = Boolean.TrueString;
headers["NServiceBus.CallType"] = Enum.GetName(typeof(CallType), callType);
headers[HttpHeaders.ContentMD5] = Hasher.Hash(data);
Logger.DebugFormat("Sending message - {0} to: {1}", callType, targetSite.Channel.Address);
channelSender.Send(targetSite.Channel.Address, headers, data);
}
开发者ID:ramonsmits,项目名称:NServiceBus.Gateway,代码行数:11,代码来源:SingleCallChannelForwarder.cs
示例16: Create
public static CallProvider Create(CallType type, IUnitOfWork unitOfWork, IEmailHelper emailHelper)
{
switch (type)
{
case CallType.Telesale:
return new TelesaleCallProvider(unitOfWork, emailHelper);
case CallType.BD:
return new BdCallProvider(unitOfWork, emailHelper);
default:
throw new Exception("Incorrect call type");
}
}
开发者ID:changLiuUNSW,项目名称:BDSystem,代码行数:12,代码来源:CallProvider.cs
示例17: CallAPI
private async Task<JObject> CallAPI(string endpoint, CallType callType, JObject payload = null)
{
JObject result = null;
HttpClient client = null;
try
{
client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", _token);
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage response = null;
string fullPathEndpoint = Path.Combine(_requestUri, endpoint);
Console.WriteLine("Calling " + fullPathEndpoint + "...");
if (callType == CallType.POST)
{
HttpContent httpContent = null;
if (payload != null)
{
httpContent = new StringContent(payload.ToString(), Encoding.UTF8, "application/json");
//Console.WriteLine("Call Payload: " + payload.ToString());
}
response = await client.PostAsync(fullPathEndpoint, httpContent);
}
else
{
response = await client.GetAsync(fullPathEndpoint);
}
string responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine("Response Code: " + response.StatusCode.ToString());
//Console.WriteLine("Call Response: " + responseString);
if (response.IsSuccessStatusCode)
{
if (!string.IsNullOrEmpty(responseString)) result = JObject.Parse(responseString);
}
}
catch (Exception ex)
{
Console.WriteLine("Call Exception: " + ex.Message);
}
finally
{
if (client != null)
client.Dispose();
}
return result;
}
开发者ID:slunyakin,项目名称:RealTime-PowerBI,代码行数:52,代码来源:PowerBI.cs
示例18: Call
public Call(Seat bidder, CallType type, Bid bid = null)
{
if (bidder == Seat.None)
throw new ArgumentException("Bidder must not be none.");
if (type == CallType.None)
throw new ArgumentException("Call type must not be none.");
if (type == CallType.Bid && bid == null)
throw new ArgumentException("Bid must not be null when call type is bid.");
Bidder = bidder;
CallType = type;
Bid = bid;
}
开发者ID:rsarwas,项目名称:BridgeIt,代码行数:13,代码来源:Call.cs
示例19: GetNextCall
/// <summary>
/// return next call base on supplied informations
/// </summary>
/// <param name="type">type of call provider</param>
/// <param name="initial">initial for find next call, ignored if siteId is supplied</param>
/// <param name="siteId">siteId for find next call</param>
/// <param name="lastCallId">Qccupied call id</param>
/// <returns></returns>
public CallDetail GetNextCall(CallType type, string initial, int? siteId, int? lastCallId)
{
var provider = GetProvider(type);
if (lastCallId.HasValue)
_contactService.RemoveOccupiedCall(lastCallId.Value);
if (siteId.HasValue)
return provider.GroupCall.Next(initial, siteId.Value);
if (!string.IsNullOrEmpty(initial))
return provider.StandardCall.Next(initial);
return null;
}
开发者ID:changLiuUNSW,项目名称:BDSystem,代码行数:22,代码来源:CallService.cs
示例20: CheckCallType
private CallType CheckCallType(CallType ct, string[] t)
{
if (t[0] == "__stdcall")
{
t[0] = Read();
return CallType.Std;
}
else if (t[0] == "__cdecl")
{
t[0] = Read();
return CallType.CDecl;
}
return ct;
}
开发者ID:7shi,项目名称:LLPML,代码行数:14,代码来源:Parser.Sentence.cs
注:本文中的CallType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论