public async override Task CreateAsync(GalleryMap galleryMap) { CloudTable masterTable = await GetMasterTable(); var insertOperation = TableOperation.Insert(GalleryMapEntity.From(galleryMap)); await masterTable.ExecuteAsync(insertOperation); }
protected GalleryMapEntity(GalleryMap galleryMap) { this.MapString = galleryMap.MapString; this.ShortName = galleryMap.ShortName; this.Description = galleryMap.Description; this.Players = galleryMap.Players; this.MapQuality = Enum.GetName(typeof(MapQuality), galleryMap.MapQuality); this.Category = galleryMap.Category; this.OwnerId = galleryMap.Owner.Id; this.OwnerIdentityProvider = galleryMap.Owner.IdentityProvider; this.PartitionKey = MasterPartitionKey; this.RowKey = CreateCanonicalShortName(galleryMap.ShortName); }
public void BasicTest() { var scpt = new Owner(ownerName: "SCPT", ownerId: "SCPT", identityProvider: "Internal", emailAddress: "*****@*****.**", publicOwner: true); GalleryMap galleryMap = new GalleryMap( mapString: "40 47 32 38 44 36 20 48 26 22 31 41 30 19 27 39 35 21 0 45 34 0 43 29 0 49 25 0 50 37 0 42 24 0 46 28", mapShortName: "scpttourny2020-prelim-v3", mapDescription: "The map used for the Space Cats Peace Turtles TwilightImperium 4th edition 2020 Tabletop Simulator Tournament Prelims. v3.0", players: 6, mapQuality: MapQuality.Curated, category: "Tournament", owner: scpt); Assert.True(true); }
public static GalleryMapEntity From(GalleryMap galleryMap) { return(new GalleryMapEntity(galleryMap)); }
public abstract Task CreateAsync(GalleryMap galleryMap);
public async Task <CommandResult> CreateGalleryMap(GalleryMap galleryMap) => await ExecuteCommand(Policies.Default, () => this.mapsRepository.CreateAsync(galleryMap));