• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# MessageInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中MessageInfo的典型用法代码示例。如果您正苦于以下问题:C# MessageInfo类的具体用法?C# MessageInfo怎么用?C# MessageInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MessageInfo类属于命名空间,在下文中一共展示了MessageInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
 }
开发者ID:SoumikMukherjeeDOTNET,项目名称:wcf,代码行数:7,代码来源:XmlSerializerOperationFormatter.cs


示例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";
            }
        }
开发者ID:roshnisushanth,项目名称:Ignite_MHT,代码行数:35,代码来源:IgniteService.svc.cs


示例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);
 }
开发者ID:ssethi,项目名称:TestFrameworks,代码行数:7,代码来源:ShowTitledMessageCommand.cs


示例5: CreateTextDisplay

 IEnumerator CreateTextDisplay(MessageInfo info)
 {
     textField.text = info.message;
     textField.color = info.color;
     yield return new WaitForSeconds(textTime);
     textField.text = "";
     yield break;
 }
开发者ID:DomCristaldi,项目名称:Coda,代码行数:8,代码来源:DemoInputChecker.cs


示例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;
 }
开发者ID:jmacnico,项目名称:Proxmulator,代码行数:8,代码来源:Trigger.cs


示例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);
     }
 }
开发者ID:Codeer-Software,项目名称:Friendly.Windows.Grasp,代码行数:16,代码来源:MessageUtility.cs


示例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;
 }
开发者ID:mdabbagh88,项目名称:MemBus,代码行数:13,代码来源:SubscriptionPipeline.cs


示例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();
        }
开发者ID:willmurphyscode,项目名称:MSMQCommander,代码行数:15,代码来源:DeleteMessageTests.cs


示例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;
 }
开发者ID:ecanzonieri,项目名称:JimbeSoftware,代码行数:15,代码来源:TaskHelper.cs


示例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;
        }
开发者ID:jmacnico,项目名称:Proxmulator,代码行数:45,代码来源:Trigger.cs


示例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;
     }
 }
开发者ID:shyam2293,项目名称:spencers,代码行数:23,代码来源:Basepage.cs


示例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;
 }
开发者ID:jeske,项目名称:StepsDB-alpha,代码行数:6,代码来源:SharpMimeMessage.cs


示例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;
        }
开发者ID:anhtv13,项目名称:ATDChatServer,代码行数:15,代码来源:ChatHub.cs


示例16: CreateHeaderDescriptionTable

                private void CreateHeaderDescriptionTable(MessageDescription message, MessageInfo info, XmlMembersMapping headersMapping)
                {
                    int headerNameIndex = 0;
                    OperationFormatter.MessageHeaderDescriptionTable headerDescriptionTable = new OperationFormatter.MessageHeaderDescriptionTable();
                    info.SetHeaderDescriptionTable(headerDescriptionTable);
                    foreach (MessageHeaderDescription header in message.Headers)
                    {
                        if (header.IsUnknownHeaderCollection)
                            info.SetUnknownHeaderDescription(header);
                        else if (headersMapping != null)
                        {
                            XmlMemberMapping memberMapping = headersMapping[headerNameIndex++];

                            if (GeneratedXmlSerializers.IsInitialized)
                            {
                                // If GeneratedXmlSerializers has been initialized, we would use the 
                                // mappings generated by .Net Native tools. In that case, the mappings
                                // we genrated at Runtime are just fake mapping instance which have
                                // no valid name/namespace. Therefore we cannot do the checks in the
                                // else block. Those checks should have been done during NET Native 
                                // precompilation.
                                headerDescriptionTable.Add(header.Name, header.Namespace, header);
                            }
                            else
                            {
                                string headerName, headerNs;
                                headerName = memberMapping.XsdElementName;
                                headerNs = memberMapping.Namespace;
                                if (headerName != header.Name)
                                {
                                    if (message.MessageType != null)
                                        throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.Format(SR.SFxHeaderNameMismatchInMessageContract, message.MessageType, header.MemberInfo.Name, header.Name, headerName)));
                                    else
                                        throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.Format(SR.SFxHeaderNameMismatchInOperation, this.Operation.Name, this.Operation.DeclaringContract.Name, this.Operation.DeclaringContract.Namespace, header.Name, headerName)));
                                }
                                if (headerNs != header.Namespace)
                                {
                                    if (message.MessageType != null)
                                        throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.Format(SR.SFxHeaderNamespaceMismatchInMessageContract, message.MessageType, header.MemberInfo.Name, header.Namespace, headerNs)));
                                    else
                                        throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.Format(SR.SFxHeaderNamespaceMismatchInOperation, this.Operation.Name, this.Operation.DeclaringContract.Name, this.Operation.DeclaringContract.Namespace, header.Namespace, headerNs)));
                                }

                                headerDescriptionTable.Add(headerName, headerNs, header);
                            }
                        }
                    }
                }
开发者ID:weshaggard,项目名称:wcf,代码行数:48,代码来源:XmlSerializerOperationBehavior.cs


示例17: CreateMessageInfo

 private MessageInfo CreateMessageInfo(MessageDescription message, string key)
 {
     if (message.IsUntypedMessage)
         return null;
     MessageInfo info = new MessageInfo();
     bool isEncoded = false;
     if (message.IsTypedMessage)
         key = message.MessageType.FullName + ":" + isEncoded + ":" + IsRpc;
     XmlMembersMapping headersMapping = LoadHeadersMapping(message, key + ":Headers");
     info.SetHeaders(_parent._generation.AddSerializer(headersMapping));
     MessagePartDescriptionCollection rpcEncodedTypedMessgeBodyParts;
     info.SetBody(_parent._generation.AddSerializer(LoadBodyMapping(message, key, out rpcEncodedTypedMessgeBodyParts)), rpcEncodedTypedMessgeBodyParts);
     CreateHeaderDescriptionTable(message, info, headersMapping);
     return info;
 }
开发者ID:weshaggard,项目名称:wcf,代码行数:15,代码来源:XmlSerializerOperationBehavior.cs


示例18: RunRequest

 protected virtual void RunRequest(MessageInfo message, CommandInfo command)
 {
     Client.SendMessage(message.Chat.Id, command.StaticAcceptMessage);
 }
开发者ID:themehrdad,项目名称:NetTelebot,代码行数:4,代码来源:Bot.cs


示例19: OnUnknownCommandReceived

 protected virtual void OnUnknownCommandReceived(MessageInfo message)
 {
     if (UnknownCommandReceived != null)
         UnknownCommandReceived(this, new MessageEventArgs(message));
 }
开发者ID:themehrdad,项目名称:NetTelebot,代码行数:5,代码来源:Bot.cs


示例20: GetFirstParameter

 protected virtual void GetFirstParameter(MessageInfo message, CommandInfo command)
 {
     var parameter = command.Parameters.First();
     Data.SetCommand(message.From.Id, message.Chat.Id, command.Text);
     Client.SendMessage(message.Chat.Id, parameter.StaticPrompt);
 }
开发者ID:themehrdad,项目名称:NetTelebot,代码行数:6,代码来源:Bot.cs



注:本文中的MessageInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# MessageLevel类代码示例发布时间:2022-05-24
下一篇:
C# MessageImportance类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap