public void Save(string convKey,ConversationContext convContext)
        {
            try
            {
                var fileName = convKey.Replace(',', '_');
                fileName = fileName.Replace('(', '_');
                fileName = fileName.Replace(')', '_');
                fileName = fileName.Replace(' ', '_');

                fileName = fileName.Replace(':', '.');
                fileName = fileName.Replace("__", "_");
                fileName = fileName.Trim(new char[] { '_' });

                var path = Configuration.FileArchivePath + fileName + ".conv";
                var conversationText = convContext.GetConversation();
                
                if (!File.Exists(path))
                {
                    using (StreamWriter sw = File.CreateText(path))
                    {
                        sw.WriteLine("--------------------------------------------------------------------------------");
                        sw.WriteLine(DateTime.Now.ToString());
                        sw.WriteLine("--------------------------------------------------------------------------------");
                        sw.Write(conversationText);
                    }
                }
                else
                {
                    using (StreamWriter sw = File.AppendText(path))
                    {
                        var fileInfo = new FileInfo(path);
                        if (!fileInfo.LastWriteTime.Date.Equals(DateTime.Now.Date))
                        {
                            sw.WriteLine("--------------------------------------------------------------------------------");
                            sw.WriteLine(DateTime.Now.ToString());
                            sw.WriteLine("--------------------------------------------------------------------------------");
                        }
                        sw.Write(conversationText);
                    }
                }
            }
            catch
            {

            }
        }
        public void Save(string convKey, ConversationContext convContext)
        {
            try
            {
                var fileName = convKey.Replace(',', '_');
                fileName = fileName.Replace('(', '_');
                fileName = fileName.Replace(')', '_');
                fileName = fileName.Replace(' ', '_');

                fileName = fileName.Replace(':', '.');
                fileName = fileName.Replace("__", "_");
                fileName = fileName.Trim(new char[] { '_' });

                var path             = Configuration.FileArchivePath + fileName + ".conv";
                var conversationText = convContext.GetConversation();

                if (!File.Exists(path))
                {
                    using (StreamWriter sw = File.CreateText(path))
                    {
                        sw.WriteLine("--------------------------------------------------------------------------------");
                        sw.WriteLine(DateTime.Now.ToString());
                        sw.WriteLine("--------------------------------------------------------------------------------");
                        sw.Write(conversationText);
                    }
                }
                else
                {
                    using (StreamWriter sw = File.AppendText(path))
                    {
                        var fileInfo = new FileInfo(path);
                        if (!fileInfo.LastWriteTime.Date.Equals(DateTime.Now.Date))
                        {
                            sw.WriteLine("--------------------------------------------------------------------------------");
                            sw.WriteLine(DateTime.Now.ToString());
                            sw.WriteLine("--------------------------------------------------------------------------------");
                        }
                        sw.Write(conversationText);
                    }
                }
            }
            catch
            {
            }
        }
        private void conversation_InstantMessageSent(object sender, MessageSentEventArgs e)
        {
            var modality     = sender as InstantMessageModality;
            var participants = modality.Conversation.Participants;

            string name    = (string)modality.Participant.Contact.GetContactInformation(ContactInformationType.DisplayName);
            var    convKey = calculateKey(participants);

            if (conversationContent.ContainsKey(convKey))
            {
                var onGoingConv = conversationContent[convKey];
                onGoingConv.AddVerse(name, e.Text);
            }
            else
            {
                var newConv = new ConversationContext();
                newConv.AddVerse(name, e.Text);
                conversationContent.Add(convKey, newConv);
            }
        }
 public void Save(string convKey, ConversationContext convContext)
 {
     throw new NotImplementedException();
 }
 public void Save(string convKey, ConversationContext convContext)
 {
     throw new NotImplementedException();
 }
 private void conversation_InstantMessageSent(object sender, MessageSentEventArgs e)
 {
     var modality = sender as InstantMessageModality;
     var participants = modality.Conversation.Participants;
     
     string name = (string)modality.Participant.Contact.GetContactInformation(ContactInformationType.DisplayName);
     var convKey = calculateKey(participants);
     
     if (conversationContent.ContainsKey(convKey))
     {
         var onGoingConv = conversationContent[convKey];
         onGoingConv.AddVerse(name,e.Text);
     }
     else
     {
         var newConv = new ConversationContext();
         newConv.AddVerse(name,e.Text);
         conversationContent.Add(convKey,newConv);
     }      
 }