本文整理汇总了C#中MessageInfo类的典型用法代码示例。如果您正苦于以下问题:C# MessageInfo类的具体用法?C# MessageInfo怎么用?C# MessageInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MessageInfo类属于命名空间,在下文中一共展示了MessageInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: XmlSerializerOperationFormatter
public XmlSerializerOperationFormatter(OperationDescription description, XmlSerializerFormatAttribute xmlSerializerFormatAttribute,
MessageInfo requestMessageInfo, MessageInfo replyMessageInfo) :
base(description, xmlSerializerFormatAttribute.Style == OperationFormatStyle.Rpc, false/*isEncoded*/)
{
_requestMessageInfo = requestMessageInfo;
_replyMessageInfo = replyMessageInfo;
}
示例2: PermanentlyDeleteMessage
public string PermanentlyDeleteMessage(Stream message)
{
try
{
MessageBox objInput = JSonHelper.JsonDeserialize<MessageBox>(new StreamReader(message).ReadToEnd());
if (System.Configuration.ConfigurationManager.AppSettings[objInput.Pin] == null)
{
return "Invalid PIN";
}
if (objInput.Pin != null && objInput.Pin.Length > 0)
{
MessageBox obj2 = new MessageBox();
List<MessageInfo> objcol = new List<MessageInfo>();
MessageInfo obj = new MessageInfo();
MessageBLL objbll = new MessageBLL();
obj.MessageComposeId = objInput.MessageComposeId;
obj.Pin = System.Configuration.ConfigurationManager.AppSettings[objInput.Pin].ToString();
int i = objbll.DeleteMessages_DeletedItems(obj);
if (i > 0)
return "Delete sucessful";
else
return "Delete Unsucessful";
}
else
{
return "Pin is a required field";
}
}
catch (Exception ex)
{
return "Unable to delete. Please try again later";
}
}
示例3: DataContractSerializerOperationFormatter
public DataContractSerializerOperationFormatter(OperationDescription description, DataContractFormatAttribute dataContractFormatAttribute, DataContractSerializerOperationBehavior serializerFactory) : base(description, dataContractFormatAttribute.Style == OperationFormatStyle.Rpc, false)
{
if (description == null)
{
throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("description");
}
this.serializerFactory = serializerFactory ?? new DataContractSerializerOperationBehavior(description);
foreach (System.Type type in description.KnownTypes)
{
if (this.knownTypes == null)
{
this.knownTypes = new List<System.Type>();
}
if (type == null)
{
throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(System.ServiceModel.SR.GetString("SFxKnownTypeNull", new object[] { description.Name })));
}
this.ValidateDataContractType(type);
this.knownTypes.Add(type);
}
this.requestMessageInfo = this.CreateMessageInfo(dataContractFormatAttribute, base.RequestDescription, this.serializerFactory);
if (base.ReplyDescription != null)
{
this.replyMessageInfo = this.CreateMessageInfo(dataContractFormatAttribute, base.ReplyDescription, this.serializerFactory);
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:26,代码来源:DataContractSerializerOperationFormatter.cs
示例4: Callback
public void Callback(MessageInfo message)
{
//Note: This is for demo purposes only.
//Note: It is not a good practice to call MessageBox.Show from a non-View class.
//Note: Consider implementing a MessageBoxService.
MessageBox.Show(message.Message, message.Title, MessageBoxButton.OK);
}
示例5: CreateTextDisplay
IEnumerator CreateTextDisplay(MessageInfo info)
{
textField.text = info.message;
textField.color = info.color;
yield return new WaitForSeconds(textTime);
textField.text = "";
yield break;
}
示例6: Trigger
public Trigger(MessageInfo msg, TriggerType type)
{
this.OnlyOneUse = false;
this.RunOnReceivedMsg = false;
this.Conditions = new List<Condition>();
this.Message = msg;
this.Type = type;
}
示例7: XmlSerializerOperationFormatter
public XmlSerializerOperationFormatter(OperationDescription description, XmlSerializerFormatAttribute xmlSerializerFormatAttribute, MessageInfo requestMessageInfo, MessageInfo replyMessageInfo) : base(description, xmlSerializerFormatAttribute.Style == OperationFormatStyle.Rpc, xmlSerializerFormatAttribute.IsEncoded)
{
if (xmlSerializerFormatAttribute.IsEncoded && (xmlSerializerFormatAttribute.Style != OperationFormatStyle.Rpc))
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(System.ServiceModel.SR.GetString("SFxDocEncodedNotSupported", new object[] { description.Name })));
}
this.isEncoded = xmlSerializerFormatAttribute.IsEncoded;
this.requestMessageInfo = requestMessageInfo;
this.replyMessageInfo = replyMessageInfo;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:10,代码来源:XmlSerializerOperationFormatter.cs
示例8: SendMessage
/// <summary>
/// メッセージを連続送信。
/// </summary>
/// <param name="windowHandle">ウィンドウハンドル。</param>
/// <param name="info">メッセージ情報。</param>
public static void SendMessage(IntPtr windowHandle, MessageInfo[] info)
{
if (info == null)
{
throw new ArgumentNullException("info");
}
for (int i = 0; i < info.Length; i++)
{
NativeMethods.SendMessage(windowHandle, info[i].Message, info[i].WParam, info[i].LParam);
}
}
示例9: Shape
public IEnumerable<ISubscription> Shape(IEnumerable<ISubscription> subscriptions, object message)
{
var info = new MessageInfo(message);
var resultingSubscriptions = subscriptions;
for (int i = _shapeProviders.Count - 1; i >= 0; i--) //Backwards as we keep the default at index 0
{
if (!_shapeProviders[i].Handles(info))
continue;
resultingSubscriptions = _shapeProviders[i].Enhance(subscriptions);
break;
}
return resultingSubscriptions;
}
示例10: Arrange
protected override void Arrange()
{
Cleanup();
_queueService = new QueueService();
_queuePath = QueueTestHelper.CreateQueuePathForPrivateQueue(ComputerName, TestQueueName, _isTransactional);
_queueService.CreateQueue(_queuePath, _isTransactional);
_queueService.CreateMessage(_queuePath, new TestClass1 { StringValue1 = "Should not be deleted" }, TestMessagesLabelForMessageWhichShouldNotBeDeleted);
_messageData = new TestClass1 { IntValue1 = 1, StringValue1 = "string1" };
_queueService.CreateMessage(_queuePath, _messageData, TestMessagesLabel);
_messageToDelete = _queueService.GetMessageInfos(_queuePath, TestMessagesLabel).Single();
}
示例11: GetTasks
internal static IEnumerable<Task> GetTasks()
{
IList<Task> tasks = new List<Task>();
tasks.Add(new StartProcess("http://www.google.it"));
Task task = new MessageInfo("Periodioco 30s", Task.TaskType.Periodic);
task.Delay=new TimeSpan(0,0,0,30);
tasks.Add(task);
task = new MessageInfo("Delayed 10 s ", Task.TaskType.Delayed);
task.Delay=new TimeSpan(0,0,0,10);
tasks.Add(task);
task = new MessageInfo("Periodic 60s",Task.TaskType.Periodic);
task.Delay=new TimeSpan(0,0,1,0);
tasks.Add(task);
return tasks;
}
示例12: RunTrigger
public virtual bool RunTrigger(MessageInfo msg, List<MessageInfo> Received, bool triggerFired)
{
if (msg == null)
return false;
var result = true;
var xml = msg.xml;
NpuToUse = msg.NPU;
if (triggerFired && OnlyOneUse)
return false;
foreach (var cond in Conditions)
{
if (!cond.IsConditionTrue(xml))
result = false;
}
if (!result && RunOnReceivedMsg)
{
foreach (var oldMsg in Received)
{
var oldXml = oldMsg.xml;
result = true;
foreach (var cond in Conditions)
{
if (!cond.IsConditionTrue(oldXml))
{
result = false;
break;
}
}
if (result == true)
{
NpuToUse = oldMsg.NPU;
break;
}
}
}
return result;
}
示例13: ShowMessage
/// <summary>
/// Converts the color of the resultant text
/// </summary>
/// <param name="message"></param>
/// <param name="type"></param>
public void ShowMessage(string message, MessageInfo type)
{
Label commonLabel = this.Page.Master.FindControl("CommonLabel") as Label;
if (commonLabel != null)
{
switch (type)
{
case MessageInfo.Error:
commonLabel.ForeColor = Color.Red;
break;
case MessageInfo.Information:
commonLabel.ForeColor = Color.Green;
commonLabel.Font.Bold = true;
break;
}
commonLabel.Text = message;
}
}
示例14: SharpMimeMessage
private SharpMimeMessage( anmar.SharpMimeTools.SharpMimeMessageStream message, long startpoint, long endpoint )
{
this.message = message;
this.mi = new MessageInfo ( this.message, startpoint );
this.mi.end = endpoint;
}
示例15: SendMessageToFriend
public ChatResult SendMessageToFriend(MessageInfo msg)
{
CustomerInfo myCustomer = Manager.Instance.GetCustomerByConnectionId(Context.ConnectionId);
CustomerInfo friendCustomer = Manager.Instance.GetCustomerByCustomerId(msg.ReceiverId);
//send message to friend
List<string> friendConnectionIds = friendCustomer.ConnectionList;
Clients.Clients(friendConnectionIds).OnReceiveMessage(msg);
//send message to myCustomer(#connectionId)
List<string> myConnectionIds = new List<string>(myCustomer.ConnectionList);
myConnectionIds.Remove(Context.ConnectionId);
Clients.Clients(myConnectionIds).OnReceiveMessage(msg);
ChatResult result = Manager.Instance.AddMessage(msg);
return result;
}