Example #1
0
        public ReadBlogsResult Create(
            global::StrawberryShake.IOperationResultDataInfo dataInfo,
            global::StrawberryShake.IEntityStoreSnapshot?snapshot = null)
        {
            if (snapshot is null)
            {
                snapshot = _entityStore.CurrentSnapshot;
            }

            if (dataInfo is ReadBlogsResultInfo info)
            {
                return(new ReadBlogsResult(MapIReadBlogs_PostsArray(
                                               info.Posts,
                                               snapshot)));
            }

            throw new global::System.ArgumentException("ReadBlogsResultInfo expected.");
        }
 global::System.Object global::StrawberryShake.IOperationResultDataFactory.Create(global::StrawberryShake.IOperationResultDataInfo dataInfo, global::StrawberryShake.IEntityStoreSnapshot?snapshot)
 {
     return(Create(dataInfo, snapshot));
 }
        public GetCustomValueResult Create(global::StrawberryShake.IOperationResultDataInfo dataInfo, global::StrawberryShake.IEntityStoreSnapshot?snapshot = null)
        {
            if (snapshot is null)
            {
                snapshot = _entityStore.CurrentSnapshot;
            }

            if (dataInfo is GetCustomValueResultInfo info)
            {
                return(new GetCustomValueResult(info.CustomScalar));
            }

            throw new global::System.ArgumentException("GetCustomValueResultInfo expected.");
        }
        public GetHero_Hero_Human Map(global::StrawberryShake.CodeGeneration.CSharp.Integration.StarWarsTypeNameOnInterfaces.State.HumanEntity entity, global::StrawberryShake.IEntityStoreSnapshot?snapshot = null)
        {
            if (snapshot is null)
            {
                snapshot = _entityStore.CurrentSnapshot;
            }

            return(new GetHero_Hero_Human(entity.__typename));
        }
Example #5
0
        public GetHero_Hero_Droid Map(global::StrawberryShake.CodeGeneration.CSharp.Integration.StarWarsGetHero.State.DroidEntity entity, global::StrawberryShake.IEntityStoreSnapshot?snapshot = null)
        {
            if (snapshot is null)
            {
                snapshot = _entityStore.CurrentSnapshot;
            }

            return(new GetHero_Hero_Droid(entity.Name));
        }
Example #6
0
        public FindClansResult Create(global::StrawberryShake.IOperationResultDataInfo dataInfo, global::StrawberryShake.IEntityStoreSnapshot?snapshot = null)
        {
            if (snapshot is null)
            {
                snapshot = _entityStore.CurrentSnapshot;
            }

            if (dataInfo is FindClansResultInfo info)
            {
                return(new FindClansResult(MapIFindClans_ClansNonNullableArray(info.Clans, snapshot)));
            }

            throw new global::System.ArgumentException("FindClansResultInfo expected.");
        }