ConversationBase.cs
1 using System;
2 using System.Collections.Generic;
4 using Newtonsoft.Json;
5 
6 namespace Microsoft.Bot.Builder.Calling.ObjectModel.Contracts
7 {
13  [JsonObject(MemberSerialization.OptOut)]
14  public abstract class ConversationBase
15  {
19  [JsonProperty(Required = Required.Always, Order = -2)]
20  public string Id { get; set; }
21 
25  [JsonProperty(Required = Required.Default)]
26  public string AppId { get; set; }
27 
32  [JsonProperty(Required = Required.Default)]
33  public string AppState { get; set; }
34 
38  [JsonProperty(Required = Required.Default)]
39  public Dictionary<string, Uri> Links { get; set; }
40 
41  public virtual void Validate()
42  {
43  Utils.AssertArgument(!String.IsNullOrWhiteSpace(this.Id), "Id cannot be null or empty");
44  ApplicationState.Validate(this.AppState);
45  }
46  }
47 }
static void Validate(string appState)
helper method to validate appState
Root namespace for the Microsoft Bot Builder Calling SDK object model.
static void AssertArgument(bool condition, string format, params object[] args)
Argument checker
Definition: Utils.cs:17
Root namespace for the Microsoft Bot Builder Calling SDK.
This base class defines a subset of properties which define a conversation. Conversation class derive...
Namespace for utilities and helpers in the Microsoft Bot Builder Calling SDK.
Root namespace for the Microsoft Bot Builder SDK.