Пример #1
0
 public global::StrawberryShake.EntityId Parse(global::System.Text.Json.JsonElement obj)
 {
     global::System.String __typename = obj.GetProperty("__typename").GetString() !;
     return(__typename switch
     {
         _ => throw new global::System.NotSupportedException()
     }
        public static global::StrawberryShake.EntityId CreateEntityId(global::System.Text.Json.JsonElement obj)
        {
            global::System.String typeName = obj.GetProperty("__typename").GetString() !;

            return(typeName switch
            {
                "Person" => CreatePersonEntityId(obj, typeName),
                _ => throw new global::System.NotSupportedException()
            });
        private (IGetPeopleResult, GetPeopleResultInfo) BuildData(global::System.Text.Json.JsonElement obj)
        {
            using global::StrawberryShake.IEntityUpdateSession session = _entityStore.BeginUpdate();
            var entityIds = new global::System.Collections.Generic.HashSet <global::StrawberryShake.EntityId>();


            var resultInfo = new GetPeopleResultInfo(
                DeserializeIGetPeople_People(
                    global::StrawberryShake.Transport.Http.JsonElementExtensions.GetPropertyOrNull(obj, "people"),
                    entityIds),
                entityIds,
                session.Version);

            return(_resultDataFactory.Create(resultInfo), resultInfo);
        }
        private (IGetMessagesResult, GetMessagesResultInfo) BuildData(global::System.Text.Json.JsonElement obj)
        {
            using global::StrawberryShake.IEntityUpdateSession session = _entityStore.BeginUpdate();
            var entityIds = new global::System.Collections.Generic.HashSet <global::StrawberryShake.EntityId>();

            global::StrawberryShake.EntityId personByEmailId = UpdateNonNullableIGetMessages_PersonByEmailEntity(
                global::StrawberryShake.Transport.Http.JsonElementExtensions.GetPropertyOrNull(obj, "personByEmail"),
                entityIds);

            var resultInfo = new GetMessagesResultInfo(
                personByEmailId,
                entityIds,
                session.Version);

            return(_resultDataFactory.Create(resultInfo), resultInfo);
        }
        private (IGetCustomValueResult, GetCustomValueResultInfo) BuildData(global::System.Text.Json.JsonElement obj)
        {
            var entityIds = new global::System.Collections.Generic.HashSet <global::StrawberryShake.EntityId>();

            global::StrawberryShake.IEntityStoreSnapshot snapshot = default !;