Esempio n. 1
0
 private ApiAiContext AdvContextToApiContext()
 {
     return(new ApiAiContext
     {
         Name = "AdventureContext",
         Lifespan = 100,
         Parameters = new Dictionary <string, string>
         {
             { "CurrentLocationId", _advContext.CurrentLocation.Id.ToString() },
             { "Flags", Convert.ToBase64String(BitConverter.GetBytes((Int32)_advContext.Flags)) },
             { "ItemLocations", _advContext.ItemLocationsToJson() },
             { "ItemsMoveableStates", _advContext.StatesToJson() }
         }
     });
 }