示例#1
0
        public void TestInitialize()
        {
            AotHelper.EnsureList <bool>();                                    // used in JsonSerializerTest.DeserializeBooleans
            AotHelper.EnsureList <bool?>();                                   // used in JsonSerializerTest.DeserializeNullableBooleans
            AotHelper.EnsureList <int>();                                     // used in ContractResolverTests.ListInterfaceDefaultCreator
            AotHelper.EnsureList <int?>();                                    // used in JsonSerializerCollectionsTests.DeserializeIEnumerableFromConstructor
            AotHelper.EnsureList <long>();                                    // used in JsonSerializerTest.ReadTooLargeInteger
            AotHelper.EnsureList <float>();                                   // used in JsonSerializerTest.ReadStringFloatingPointSymbols
            AotHelper.EnsureList <double>();                                  // used in JsonSerializerTest.ReadStringFloatingPointSymbols
            AotHelper.EnsureList <double?>();                                 // used in JsonSerializerTest.DeserializeNullableArray
            AotHelper.EnsureList <decimal>();                                 // used in JsonSerializerTest.CommentTestClassTest
            AotHelper.EnsureList <BigInteger>();                              // used in JsonSerializerTest.ReadTooLargeInteger
            AotHelper.EnsureList <Guid>();                                    // used in BsonReaderTests
            AotHelper.EnsureList <DateTime>();                                // used in DeserializeDateFormatString
            AotHelper.EnsureList <DateTimeOffset?>();                         // used in JsonSerializerTest.ReadForTypeHackFixDateTimeOffset
            AotHelper.EnsureList <KeyValuePair <string, IList <string> >?>(); // used in JsonSerializerCollectionsTests.DeserializeNullableKeyValuePairArray
            AotHelper.EnsureList <KeyValuePair <string, IList <string> > >(); // used in JsonSerializerCollectionsTests.DeserializeKeyValuePairArray
            AotHelper.EnsureList <KeyValuePair <string, int> >();             // used in KeyValuePairConverterTests
            AotHelper.EnsureList <KeyValuePair <string, string> >();          // used in Issue1322
            AotHelper.EnsureDictionary <string, decimal>();                   // used in JsonSerializerTest.DeserializeDecimalDictionaryExact
            AotHelper.EnsureDictionary <string, int>();                       // used in JsonSerializerCollectionsTests.SerializeCustomReadOnlyDictionary
            AotHelper.EnsureDictionary <string, object>();                    // used in combination with JsonExtensionDataAttribute, for example in SerializeExtensionData.CustomerInvoice

            // used in Newtonsoft.Json.Tests.Serialization.TraceWriterTests.DeserializeMissingMemberConstructor
            AotHelper.Ensure(() => {
                // to not strip MajorRevision & MinorRevision
                var version  = new Version(1, 2, 3, 4);
                var majorRev = version.MajorRevision;
                var minorRev = version.MinorRevision;
            });
        }
示例#2
0
 public static void Ensure()
 {
     AotHelper.EnsureList <Conveyor.Save>();
     AotHelper.EnsureList <ConveyorItem.Save>();
     AotHelper.EnsureList <ConveyorItem.Save[]>();
     AotHelper.EnsureList <Machine.Save>();
     AotHelper.EnsureList <InventorySlot.Save>();
     AotHelper.EnsureList <SpacePlatform.Save>();
     AotHelper.EnsureList <long>();
     AotHelper.EnsureList <Bounds3Int>();
 }
示例#3
0
 public void TestInitialize()
 {
     AotHelper.EnsureList <bool>();                                    // used in JsonSerializerTest.DeserializeBooleans
     AotHelper.EnsureList <bool?>();                                   // used in JsonSerializerTest.DeserializeNullableBooleans
     AotHelper.EnsureList <int>();                                     // used in ContractResolverTests.ListInterfaceDefaultCreator
     AotHelper.EnsureList <int?>();                                    // used in JsonSerializerCollectionsTests.DeserializeIEnumerableFromConstructor
     AotHelper.EnsureList <long>();                                    // used in JsonSerializerTest.ReadTooLargeInteger
     AotHelper.EnsureList <float>();                                   // used in JsonSerializerTest.ReadStringFloatingPointSymbols
     AotHelper.EnsureList <double>();                                  // used in JsonSerializerTest.ReadStringFloatingPointSymbols
     AotHelper.EnsureList <double?>();                                 // used in JsonSerializerTest.DeserializeNullableArray
     AotHelper.EnsureList <decimal>();                                 // used in JsonSerializerTest.CommentTestClassTest
     AotHelper.EnsureList <BigInteger>();                              // used in JsonSerializerTest.ReadTooLargeInteger
     AotHelper.EnsureList <Guid>();                                    // used in BsonReaderTests
     AotHelper.EnsureList <DateTime>();                                // used in DeserializeDateFormatString
     AotHelper.EnsureList <DateTimeOffset?>();                         // used in JsonSerializerTest.ReadForTypeHackFixDateTimeOffset
     AotHelper.EnsureList <KeyValuePair <string, IList <string> >?>(); // used in JsonSerializerCollectionsTests.DeserializeNullableKeyValuePairArray
     AotHelper.EnsureList <KeyValuePair <string, IList <string> > >(); // used in JsonSerializerCollectionsTests.DeserializeKeyValuePairArray
     AotHelper.EnsureList <KeyValuePair <string, int> >();             // used in KeyValuePairConverterTests
     AotHelper.EnsureList <KeyValuePair <string, string> >();          // used in Issue1322
     AotHelper.EnsureDictionary <string, decimal>();                   // used in JsonSerializerTest.DeserializeDecimalDictionaryExact
     AotHelper.EnsureDictionary <string, int>();                       // used in JsonSerializerCollectionsTests.SerializeCustomReadOnlyDictionary
 }
示例#4
0
 private void Awake()
 {
     AotHelper.EnsureList <PlaceLocationType?>();
 }
示例#5
0
 public void Awake()
 {
     AotHelper.EnsureType <StringEnumConverter>();
 }
示例#6
0
 private void Awake()
 {
     AotHelper.EnsureType <StringEnumConverter>();
     var falseJc = new Newtonsoft.Json.JsonConstructorAttribute();
 }
示例#7
0
 public void EnsureAOT()
 {
     AotHelper.EnsureList <int?>();
     AotHelper.EnsureDictionary <Vector3Int, int>(); // used in lua
 }
示例#8
0
 public PageDto()
 {
     AotHelper.EnsureList <T>();
 }
示例#9
0
    public void Awake()
    {
        AotHelper.EnsureDictionary <string, JToken>();
        AotHelper.EnsureType <SdkConfig>();
        AotHelper.EnsureType <ConvParam>();
        AotHelper.EnsureType <UserProfileCustemStringInfo>();
        AotHelper.EnsureType <UserProfile>();
        AotHelper.EnsureType <Message>();
        AotHelper.EnsureType <OfflinePushConfig>();
        AotHelper.EnsureType <IOSOfflinePushConfig>();
        AotHelper.EnsureType <AndroidOfflinePushConfig>();
        AotHelper.EnsureType <Elem>();
        AotHelper.EnsureType <UserProfileItem>();
        AotHelper.EnsureType <GroupMemberInfo>();
        AotHelper.EnsureType <GroupTipGroupChangeInfo>();
        AotHelper.EnsureType <GroupMemberInfoCustemString>();
        AotHelper.EnsureType <GroupTipMemberChangeInfo>();
        AotHelper.EnsureType <DraftParam>();
        AotHelper.EnsureType <MsgLocator>();
        AotHelper.EnsureType <MsgGetMsgListParam>();
        AotHelper.EnsureType <MsgDeleteParam>();
        AotHelper.EnsureType <DownloadElemParam>();
        AotHelper.EnsureType <MsgBatchSendParam>();
        AotHelper.EnsureType <MessageSearchParam>();
        AotHelper.EnsureType <CreateGroupParam>();
        AotHelper.EnsureType <GroupInfoCustemString>();
        AotHelper.EnsureType <GroupInviteMemberParam>();
        AotHelper.EnsureType <GroupDeleteMemberParam>();
        AotHelper.EnsureType <GroupModifyInfoParam>();
        AotHelper.EnsureType <OfflinePushToken>();
        AotHelper.EnsureType <GroupGetMemberInfoListParam>();
        AotHelper.EnsureType <GroupMemberGetInfoOption>();
        AotHelper.EnsureType <GroupModifyMemberInfoParam>();
        AotHelper.EnsureType <GroupPendencyOption>();
        AotHelper.EnsureType <GroupHandlePendencyParam>();
        AotHelper.EnsureType <GroupPendency>();
        AotHelper.EnsureType <GroupSearchParam>();
        AotHelper.EnsureType <GroupMemberSearchParam>();
        AotHelper.EnsureType <GroupAttributes>();
        AotHelper.EnsureType <FriendShipGetProfileListParam>();
        AotHelper.EnsureType <FriendshipAddFriendParam>();
        AotHelper.EnsureType <FriendRespone>();
        AotHelper.EnsureType <FriendshipModifyFriendProfileParam>();
        AotHelper.EnsureType <FriendProfileItem>();
        AotHelper.EnsureType <FriendProfileCustemStringInfo>();
        AotHelper.EnsureType <FriendshipDeleteFriendParam>();
        AotHelper.EnsureType <FriendshipCheckFriendTypeParam>();
        AotHelper.EnsureType <FriendGroupInfo>();
        AotHelper.EnsureType <FriendshipModifyFriendGroupParam>();
        AotHelper.EnsureType <FriendshipGetPendencyListParam>();
        AotHelper.EnsureType <FriendshipDeletePendencyParam>();
        AotHelper.EnsureType <FriendSearchParam>();
        AotHelper.EnsureType <MessageReceipt>();
        AotHelper.EnsureType <GroupTipsElem>();
        AotHelper.EnsureType <ConvInfo>();
        AotHelper.EnsureType <Draft>();
        AotHelper.EnsureType <GroupAtInfo>();
        AotHelper.EnsureType <FriendAddPendency>();
        AotHelper.EnsureType <FriendProfile>();
        AotHelper.EnsureType <SetConfig>();
        AotHelper.EnsureType <HttpProxyInfo>();
        AotHelper.EnsureType <Socks5ProxyInfo>();
        AotHelper.EnsureType <UserConfig>();
        AotHelper.EnsureType <GroupGetInfoOption>();
        AotHelper.EnsureType <SSODataParam>();
        AotHelper.EnsureType <ServerAddress>();
        AotHelper.EnsureType <CustomServerInfo>();
        AotHelper.EnsureType <SM4GCMCallbackParam>();
        AotHelper.EnsureType <CosSaveRegionForConversationParam>();
        AotHelper.EnsureType <ExperimentalAPIReqeustParam>();
        AotHelper.EnsureType <GetTotalUnreadNumberResult>();
        AotHelper.EnsureType <GetC2CRecvMsgOptResult>();
        AotHelper.EnsureType <CreateGroupResult>();
        AotHelper.EnsureType <GroupInviteMemberResult>();
        AotHelper.EnsureType <GroupDeleteMemberResult>();
        AotHelper.EnsureType <GroupBaseInfo>();
        AotHelper.EnsureType <GroupSelfInfo>();
        AotHelper.EnsureType <GetGroupInfoResult>();
        AotHelper.EnsureType <GroupDetailInfo>();
        AotHelper.EnsureType <GroupPendencyResult>();
        AotHelper.EnsureType <GroupGetOnlineMemberCountResult>();
        AotHelper.EnsureType <FriendResult>();
        AotHelper.EnsureType <FriendshipCheckFriendTypeResult>();
        AotHelper.EnsureType <PendencyPage>();
        AotHelper.EnsureType <FriendAddPendencyInfo>();
        AotHelper.EnsureType <FriendInfoGetResult>();
        AotHelper.EnsureType <MessageSearchResult>();
        AotHelper.EnsureType <MessageSearchResultItem>();
        AotHelper.EnsureType <MsgBatchSendResult>();
        AotHelper.EnsureType <MsgDownloadElemResult>();
        AotHelper.EnsureType <ReponseInfo>();
        AotHelper.EnsureType <UserInfo>();
        AotHelper.EnsureType <SSODataRes>();
        AotHelper.EnsureType <GroupGetMemberInfoListResult>();

        AotHelper.EnsureList <string>();
        AotHelper.EnsureList <ulong>();
        AotHelper.EnsureList <SdkConfig>();
        AotHelper.EnsureList <ConvParam>();
        AotHelper.EnsureList <UserProfileCustemStringInfo>();
        AotHelper.EnsureList <UserProfile>();
        AotHelper.EnsureList <Message>();
        AotHelper.EnsureList <OfflinePushConfig>();
        AotHelper.EnsureList <IOSOfflinePushConfig>();
        AotHelper.EnsureList <AndroidOfflinePushConfig>();
        AotHelper.EnsureList <Elem>();
        AotHelper.EnsureList <UserProfileItem>();
        AotHelper.EnsureList <GroupMemberInfo>();
        AotHelper.EnsureList <GroupTipGroupChangeInfo>();
        AotHelper.EnsureList <GroupMemberInfoCustemString>();
        AotHelper.EnsureList <GroupTipMemberChangeInfo>();
        AotHelper.EnsureList <DraftParam>();
        AotHelper.EnsureList <MsgLocator>();
        AotHelper.EnsureList <MsgGetMsgListParam>();
        AotHelper.EnsureList <MsgDeleteParam>();
        AotHelper.EnsureList <DownloadElemParam>();
        AotHelper.EnsureList <MsgBatchSendParam>();
        AotHelper.EnsureList <MessageSearchParam>();
        AotHelper.EnsureList <CreateGroupParam>();
        AotHelper.EnsureList <GroupInfoCustemString>();
        AotHelper.EnsureList <GroupInviteMemberParam>();
        AotHelper.EnsureList <GroupDeleteMemberParam>();
        AotHelper.EnsureList <GroupModifyInfoParam>();
        AotHelper.EnsureList <OfflinePushToken>();
        AotHelper.EnsureList <GroupGetMemberInfoListParam>();
        AotHelper.EnsureList <GroupMemberGetInfoOption>();
        AotHelper.EnsureList <GroupModifyMemberInfoParam>();
        AotHelper.EnsureList <GroupPendencyOption>();
        AotHelper.EnsureList <GroupHandlePendencyParam>();
        AotHelper.EnsureList <GroupPendency>();
        AotHelper.EnsureList <GroupSearchParam>();
        AotHelper.EnsureList <GroupMemberSearchParam>();
        AotHelper.EnsureList <GroupAttributes>();
        AotHelper.EnsureList <FriendShipGetProfileListParam>();
        AotHelper.EnsureList <FriendshipAddFriendParam>();
        AotHelper.EnsureList <FriendRespone>();
        AotHelper.EnsureList <FriendshipModifyFriendProfileParam>();
        AotHelper.EnsureList <FriendProfileItem>();
        AotHelper.EnsureList <FriendProfileCustemStringInfo>();
        AotHelper.EnsureList <FriendshipDeleteFriendParam>();
        AotHelper.EnsureList <FriendshipCheckFriendTypeParam>();
        AotHelper.EnsureList <FriendGroupInfo>();
        AotHelper.EnsureList <FriendshipModifyFriendGroupParam>();
        AotHelper.EnsureList <FriendshipGetPendencyListParam>();
        AotHelper.EnsureList <FriendshipDeletePendencyParam>();
        AotHelper.EnsureList <FriendSearchParam>();
        AotHelper.EnsureList <MessageReceipt>();
        AotHelper.EnsureList <GroupTipsElem>();
        AotHelper.EnsureList <ConvInfo>();
        AotHelper.EnsureList <Draft>();
        AotHelper.EnsureList <GroupAtInfo>();
        AotHelper.EnsureList <FriendAddPendency>();
        AotHelper.EnsureList <FriendProfile>();
        AotHelper.EnsureList <SetConfig>();
        AotHelper.EnsureList <HttpProxyInfo>();
        AotHelper.EnsureList <Socks5ProxyInfo>();
        AotHelper.EnsureList <UserConfig>();
        AotHelper.EnsureList <GroupGetInfoOption>();
        AotHelper.EnsureList <SSODataParam>();
        AotHelper.EnsureList <ServerAddress>();
        AotHelper.EnsureList <CustomServerInfo>();
        AotHelper.EnsureList <SM4GCMCallbackParam>();
        AotHelper.EnsureList <CosSaveRegionForConversationParam>();
        AotHelper.EnsureList <ExperimentalAPIReqeustParam>();
        AotHelper.EnsureList <GetTotalUnreadNumberResult>();
        AotHelper.EnsureList <GetC2CRecvMsgOptResult>();
        AotHelper.EnsureList <CreateGroupResult>();
        AotHelper.EnsureList <GroupInviteMemberResult>();
        AotHelper.EnsureList <GroupDeleteMemberResult>();
        AotHelper.EnsureList <GroupBaseInfo>();
        AotHelper.EnsureList <GroupSelfInfo>();
        AotHelper.EnsureList <GetGroupInfoResult>();
        AotHelper.EnsureList <GroupDetailInfo>();
        AotHelper.EnsureList <GroupPendencyResult>();
        AotHelper.EnsureList <GroupGetOnlineMemberCountResult>();
        AotHelper.EnsureList <FriendResult>();
        AotHelper.EnsureList <FriendshipCheckFriendTypeResult>();
        AotHelper.EnsureList <PendencyPage>();
        AotHelper.EnsureList <FriendAddPendencyInfo>();
        AotHelper.EnsureList <FriendInfoGetResult>();
        AotHelper.EnsureList <MessageSearchResult>();
        AotHelper.EnsureList <MessageSearchResultItem>();
        AotHelper.EnsureList <MsgBatchSendResult>();
        AotHelper.EnsureList <MsgDownloadElemResult>();
        AotHelper.EnsureList <ReponseInfo>();
        AotHelper.EnsureList <UserInfo>();
        AotHelper.EnsureList <SSODataRes>();
        AotHelper.EnsureList <GroupGetMemberInfoListResult>();
    }
 protected TypeTester()
 {
     AotHelper.EnsureList <T>();
 }
示例#11
0
 public void Awake()
 {
     AotHelper.EnsureType <StringEnumConverter>();
     AotHelper.Ensure(() =>
     {
         // ReSharper disable once UseObjectOrCollectionInitializer
         var cardGame                            = new CardGame();
         cardGame.AllCardsUrl                    = new Uri(UnityFileMethods.FilePrefix);
         cardGame.AllCardsUrlPageCount           = 1;
         cardGame.AllCardsUrlPageCountDivisor    = 1;
         cardGame.AllCardsUrlPageCountIdentifier = string.Empty;
         cardGame.AllCardsUrlPageCountStartIndex = 1;
         cardGame.AllCardsUrlPageIdentifier      = string.Empty;
         cardGame.AllCardsUrlPostBodyContent     = string.Empty;
         cardGame.AllCardsUrlWrapped             = false;
         cardGame.AllCardsUrlZipped              = false;
         cardGame.AllDecksUrl                    = new Uri(UnityFileMethods.FilePrefix);
         cardGame.AllDecksUrlDataIdentifier      = string.Empty;
         cardGame.AllDecksUrlPostBodyContent     = string.Empty;
         cardGame.AllDecksUrlTxtRoot             = string.Empty;
         cardGame.AllSetsUrl                     = new Uri(UnityFileMethods.FilePrefix);
         cardGame.AllSetsUrlWrapped              = false;
         cardGame.AllSetsUrlZipped               = false;
         cardGame.AutoUpdate                     = 1;
         cardGame.AutoUpdateUrl                  = new Uri(UnityFileMethods.FilePrefix);
         cardGame.BannerImageFileType            = string.Empty;
         cardGame.BannerImageUrl                 = new Uri(UnityFileMethods.FilePrefix);
         cardGame.CardBackImageFileType          = string.Empty;
         cardGame.CardBackImageUrl               = new Uri(UnityFileMethods.FilePrefix);
         cardGame.CardDataIdentifier             = string.Empty;
         cardGame.CardIdIdentifier               = string.Empty;
         cardGame.CardIdStop                     = string.Empty;
         cardGame.CardImageFileType              = string.Empty;
         cardGame.CardImageProperty              = string.Empty;
         cardGame.CardImageUrl                   = string.Empty;
         cardGame.CardNameIdentifier             = string.Empty;
         cardGame.CardNameIsUnique               = false;
         cardGame.CardPrimaryProperty            = string.Empty;
         cardGame.CardProperties                 = new List <PropertyDef>();
         cardGame.CardPropertyIdentifier         = string.Empty;
         cardGame.CardSetIdentifier              = string.Empty;
         cardGame.CardSetIsObject                = false;
         cardGame.CardSetNameIdentifier          = string.Empty;
         cardGame.CardSetsInList                 = false;
         cardGame.CardSetsInListIsCsv            = false;
         cardGame.CardSize                       = new Float2(1, 1);
         cardGame.CgsDeepLink                    = new Uri(UnityFileMethods.FilePrefix);
         cardGame.DeckFileAltId                  = string.Empty;
         cardGame.DeckFileTxtId                  = DeckFileTxtId.Id;
         cardGame.DeckFileType                   = DeckFileType.Dec;
         cardGame.DeckUrls                       = new List <DeckUrl>();
         var deckUrl    = new DeckUrl(string.Empty, string.Empty, new Uri(UnityFileMethods.FilePrefix));
         cardGame.Enums = new List <EnumDef>();
         var enumDef    = new EnumDef(string.Empty,
                                      new Dictionary <string, string>());
         cardGame.Extras         = new List <ExtraDef>();
         var extraDef            = new ExtraDef(string.Empty, string.Empty, string.Empty);
         cardGame.GameBoardCards = new List <GameBoardCard>();
         var float2        = new Float2(0f, 0f);
         var gameBoard     = new GameBoard(string.Empty, float2, float2);
         var gameBoardCard = new GameBoardCard(string.Empty,
                                               new List <GameBoard>());
         cardGame.GameBoardImageFileType = string.Empty;
         cardGame.GameBoardUrls          = new List <GameBoardUrl>();
         var gameBoardUrl =
             new GameBoardUrl(string.Empty, new Uri(UnityFileMethods.FilePrefix));
         cardGame.GamePlayDeckName     = string.Empty;
         cardGame.GameStartHandCount   = 1;
         cardGame.GameStartPointsCount = 1;
         cardGame.Name = string.Empty;
         cardGame.PlayMatImageFileType  = string.Empty;
         cardGame.PlayMatImageUrl       = new Uri(UnityFileMethods.FilePrefix);
         cardGame.PlayMatSize           = new Float2(1, 1);
         cardGame.RulesUrl              = new Uri(UnityFileMethods.FilePrefix);
         cardGame.SetCardsIdentifier    = string.Empty;
         cardGame.SetCardsUrlIdentifier = string.Empty;
         cardGame.SetCodeDefault        = string.Empty;
         cardGame.SetCodeIdentifier     = string.Empty;
         cardGame.SetDataIdentifier     = string.Empty;
         cardGame.SetNameDefault        = string.Empty;
         cardGame.SetNameIdentifier     = string.Empty;
     });
 }
 static void EnforceTypes()
 {
     AotHelper.EnsureType <StringEnumConverter>();
 }