コード例 #1
0
        private object?PlatformCreate(object?value, ServerTimestampBehavior?serverTimestampBehavior)
        {
            IDocumentInfo documentInfo = _objectDocumentInfo;

            if (value is JavaList || value is AbstractList)
            {
                documentInfo = _listDocumentInfo ?? ObjectProvider.GetDocumentInfo <List <object> >();
            }
            else if ((value is JavaDictionary || value is AbstractMap) && _type == typeof(object))
            {
                documentInfo = ObjectProvider.GetDocumentInfo <Dictionary <string, object> >();
            }
            return(documentInfo.Create(value, serverTimestampBehavior));
        }
コード例 #2
0
        public object?Create(object?value, ServerTimestampBehavior?serverTimestampBehavior)
        {
            IDocumentInfo documentInfo = _objectDocumentInfo;

            if (value is NSArray)
            {
                documentInfo = _listDocumentInfo ?? ObjectProvider.GetDocumentInfo <List <object> >();
            }
            else if (value is NSDictionary && _type == typeof(object))
            {
                documentInfo = ObjectProvider.GetDocumentInfo <Dictionary <string, object> >();
            }
            return(documentInfo.Create(value, serverTimestampBehavior));
        }