当前位置: 首页>>代码示例>>C#>>正文


C# Room.Load方法代码示例

本文整理汇总了C#中Room.Load方法的典型用法代码示例。如果您正苦于以下问题:C# Room.Load方法的具体用法?C# Room.Load怎么用?C# Room.Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Room的用法示例。


在下文中一共展示了Room.Load方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateRoom

 void CreateRoom()
 {
     // Create local Room.
     var room = new Room("Unity SDK Test Room", null);
     StartCoroutine(room.Commit(error =>
     {
         // Error on Commit.
         Debug.LogError(error.Message);
     }, success =>
     {
         // Move onto loading Room.
         var searchedRoom = new Room(room.Id);
         StartCoroutine(searchedRoom.Load(error =>
         {
             // Error on Load.
             Debug.LogError(error.Message);
         }, searchedRoomSuccess =>
         {
             if (searchedRoom.Title == room.Title)
             {
                 // Load Room proves it's passed here.
                 Debug.Log("Saving new Room to Spark passed!");
                 LoadRoom(searchedRoom);
             }
         }));
     }));
 }
开发者ID:RichLogan,项目名称:CiscoSpark-UnitySDK,代码行数:27,代码来源:TestRoom.cs

示例2: Test

 void Test(Room room)
 {
     // Need to load
     var searchedRoom = new Room(room.Id);
     StartCoroutine(searchedRoom.Load(error =>
     {
         // Error on Load.
         IntegrationTest.Fail(error.Message);
     }, searchedRoomSuccess =>
     {
         if (searchedRoom.Title == room.Title)
         {
             TearDown(room);
         }
     }));
 }
开发者ID:RichLogan,项目名称:CiscoSpark-UnitySDK,代码行数:16,代码来源:TestLoadRoom.cs

示例3: DeleteRoom

 void DeleteRoom(Room room)
 {
     StartCoroutine(room.Delete(error =>
     {
         Debug.Log(error.Message);
     }, success =>
     {
         // Check room was deleted successfully.
         var checkDeletedRoom = new Room(room.Id);
         StartCoroutine(checkDeletedRoom.Load(error =>
         {
             Debug.Log("Delete Room passed!");
             ListRooms();
         }, updateSuccess =>
         {
             Debug.LogError("Delete Room failed!");
         }));
     }));
 }
开发者ID:RichLogan,项目名称:CiscoSpark-UnitySDK,代码行数:19,代码来源:TestRoom.cs

示例4: UpdateRoom

 void UpdateRoom(Room room)
 {
     room.Title = "Unity SDK Test Room - Updated";
     StartCoroutine(room.Commit(error =>
     {
         Debug.Log(room.Title);
         // Error on Update.
         Debug.LogError(error.Message);
     }, success =>
     {
         var checkUpdatedRoom = new Room(room.Id);
         StartCoroutine(checkUpdatedRoom.Load(error =>
         {
             Debug.LogError(error.Message);
         }, updateSuccess =>
         {
             if (checkUpdatedRoom.Title == room.Title)
             {
                 Debug.Log("Update Room passed!");
                 DeleteRoom(checkUpdatedRoom);
             }
         }));
     }));
 }
开发者ID:RichLogan,项目名称:CiscoSpark-UnitySDK,代码行数:24,代码来源:TestRoom.cs


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