protected override void Deserialize(IComponentDataReader reader, IAssetStore assetStore) { base.Deserialize(reader, assetStore); LinearVelocity = reader.ReadDouble("LinearVelocity"); AngularVelocity = reader.ReadDouble("AngularVelocity"); }
protected internal override void Deserialize(IComponentDataReader reader, IAssetStore assetStore) { base.Deserialize(reader, assetStore); Sound = reader.IsNull("Sound") ? null : assetStore.GetAsset <ISound>(reader.ReadAssetId("Sound")); IsPlaying = reader.ReadBool("IsPlaying"); }
public GraphQLUrlGenerator(IOptions <MyUrlsOptions> urlsOptions, IAssetStore assetStore, bool allowAssetSourceUrl) { this.assetStore = assetStore; this.urlsOptions = urlsOptions.Value; CanGenerateAssetSourceUrl = allowAssetSourceUrl; }
protected internal override void Deserialize(IComponentDataReader reader, IAssetStore assetStore) { base.Deserialize(reader, assetStore); Dimension = reader.ReadVector2("Dimension"); Color = reader.ReadColor("Color"); FillInterior = reader.ReadBool("FillInterior"); }
protected internal override void Serialize(IComponentDataWriter writer, IAssetStore assetStore) { base.Serialize(writer, assetStore); writer.WriteVector3("Translation", Translation); writer.WriteVector3("Rotation", Rotation); writer.WriteVector3("Scale", Scale); }
protected internal override void Deserialize(IComponentDataReader reader, IAssetStore assetStore) { base.Deserialize(reader, assetStore); Sprite = reader.IsNull("Sprite") ? null : assetStore.GetAsset <Sprite>(reader.ReadAssetId("Sprite")); }
public RestoreGrain( IAssetStore assetStore, IBackupArchiveLocation backupArchiveLocation, IClock clock, IEventStore eventStore, IEventDataFormatter eventDataFormatter, IGrainFactory grainFactory, IEnumerable <BackupHandler> handlers, ISemanticLog log, IStreamNameResolver streamNameResolver, IStore <string> store) { Guard.NotNull(assetStore, nameof(assetStore)); Guard.NotNull(backupArchiveLocation, nameof(backupArchiveLocation)); Guard.NotNull(clock, nameof(clock)); Guard.NotNull(eventStore, nameof(eventStore)); Guard.NotNull(eventDataFormatter, nameof(eventDataFormatter)); Guard.NotNull(grainFactory, nameof(grainFactory)); Guard.NotNull(handlers, nameof(handlers)); Guard.NotNull(store, nameof(store)); Guard.NotNull(streamNameResolver, nameof(streamNameResolver)); Guard.NotNull(log, nameof(log)); this.assetStore = assetStore; this.backupArchiveLocation = backupArchiveLocation; this.clock = clock; this.eventStore = eventStore; this.eventDataFormatter = eventDataFormatter; this.grainFactory = grainFactory; this.handlers = handlers; this.store = store; this.streamNameResolver = streamNameResolver; this.log = log; }
protected internal override void Serialize(IComponentDataWriter writer, IAssetStore assetStore) { base.Serialize(writer, assetStore); writer.WriteString("Text", Text); writer.WriteDouble("FontSize", FontSize.Points); writer.WriteColor("Color", Color); }
public BackupGrain( IAssetStore assetStore, IBackupArchiveLocation backupArchiveLocation, IClock clock, IEventStore eventStore, IEventDataFormatter eventDataFormatter, IJsonSerializer serializer, IServiceProvider serviceProvider, ISemanticLog log, IGrainState <BackupState> state) { Guard.NotNull(assetStore, nameof(assetStore)); Guard.NotNull(backupArchiveLocation, nameof(backupArchiveLocation)); Guard.NotNull(clock, nameof(clock)); Guard.NotNull(eventStore, nameof(eventStore)); Guard.NotNull(eventDataFormatter, nameof(eventDataFormatter)); Guard.NotNull(serviceProvider, nameof(serviceProvider)); Guard.NotNull(serializer, nameof(serializer)); Guard.NotNull(state, nameof(state)); Guard.NotNull(log, nameof(log)); this.assetStore = assetStore; this.backupArchiveLocation = backupArchiveLocation; this.clock = clock; this.eventStore = eventStore; this.eventDataFormatter = eventDataFormatter; this.serializer = serializer; this.serviceProvider = serviceProvider; this.state = state; this.log = log; }
public BackupGrain( IAssetStore assetStore, IBackupArchiveLocation backupArchiveLocation, IClock clock, IEventStore eventStore, IEventDataFormatter eventDataFormatter, IEnumerable <BackupHandler> handlers, IJsonSerializer serializer, ISemanticLog log, IStore <Guid> store) { Guard.NotNull(assetStore, nameof(assetStore)); Guard.NotNull(backupArchiveLocation, nameof(backupArchiveLocation)); Guard.NotNull(clock, nameof(clock)); Guard.NotNull(eventStore, nameof(eventStore)); Guard.NotNull(eventDataFormatter, nameof(eventDataFormatter)); Guard.NotNull(handlers, nameof(handlers)); Guard.NotNull(serializer, nameof(serializer)); Guard.NotNull(store, nameof(store)); Guard.NotNull(log, nameof(log)); this.assetStore = assetStore; this.backupArchiveLocation = backupArchiveLocation; this.clock = clock; this.eventStore = eventStore; this.eventDataFormatter = eventDataFormatter; this.handlers = handlers; this.serializer = serializer; this.store = store; this.log = log; }
protected override void Serialize(IComponentDataWriter writer, IAssetStore assetStore) { base.Serialize(writer, assetStore); writer.WriteDouble("LinearVelocity", LinearVelocity); writer.WriteDouble("AngularVelocity", AngularVelocity); }
public DefaultAppImageStore(IAssetStore assetStore, IOptions <AssetOptions> options) { this.assetStore = assetStore; this.options = options.Value; }
/// <inheritdoc /> protected internal override void Serialize(IComponentDataWriter writer, IAssetStore assetStore) { base.Serialize(writer, assetStore); writer.WriteBool("Visible", Visible); writer.WriteString("SortingLayerName", SortingLayerName); writer.WriteInt("OrderInLayer", OrderInLayer); }
public static async Task DownloadAsync(this IAssetStore assetStore, DirectoryInfo directory) { if (directory.Exists) { directory.Delete(true); } directory.Create(); using (var fileStream = new FileStream( Path.Combine(directory.FullName, ArchiveFile), FileMode.Create, FileAccess.ReadWrite, FileShare.None, 4096, FileOptions.DeleteOnClose)) { try { await assetStore.DownloadAsync(directory.Name, 0, string.Empty, fileStream); fileStream.Position = 0; using (var zipArchive = new ZipArchive(fileStream, ZipArchiveMode.Read, true)) { zipArchive.ExtractToDirectory(directory.FullName); } } catch (AssetNotFoundException) { return; } } }
protected internal override void Deserialize(IComponentDataReader reader, IAssetStore assetStore) { base.Deserialize(reader, assetStore); Translation = reader.ReadVector3("Translation"); Rotation = reader.ReadVector3("Rotation"); Scale = reader.ReadVector3("Scale"); }
protected internal override void Serialize(IComponentDataWriter writer, IAssetStore assetStore) { base.Serialize(writer, assetStore); writer.WriteVector2("Dimension", Dimension); writer.WriteColor("Color", Color); writer.WriteBool("FillInterior", FillInterior); }
public BackupGrain( IAssetStore assetStore, IBackupArchiveLocation backupArchiveLocation, IClock clock, IEventStore eventStore, IEventDataFormatter eventDataFormatter, ISemanticLog log, IStore <Guid> store) { Guard.NotNull(assetStore, nameof(assetStore)); Guard.NotNull(backupArchiveLocation, nameof(backupArchiveLocation)); Guard.NotNull(clock, nameof(clock)); Guard.NotNull(eventStore, nameof(eventStore)); Guard.NotNull(eventDataFormatter, nameof(eventDataFormatter)); Guard.NotNull(store, nameof(store)); Guard.NotNull(log, nameof(log)); this.assetStore = assetStore; this.backupArchiveLocation = backupArchiveLocation; this.clock = clock; this.eventStore = eventStore; this.eventDataFormatter = eventDataFormatter; this.store = store; this.log = log; }
/// <inheritdoc /> protected internal override void Deserialize(IComponentDataReader reader, IAssetStore assetStore) { base.Deserialize(reader, assetStore); Visible = reader.ReadBool("Visible"); SortingLayerName = reader.ReadString("SortingLayerName") ?? throw new InvalidOperationException("SortingLayerName cannot be null."); OrderInLayer = reader.ReadInt("OrderInLayer"); }
protected internal override void Deserialize(IComponentDataReader reader, IAssetStore assetStore) { base.Deserialize(reader, assetStore); Text = reader.ReadString("Text") ?? throw new InvalidOperationException("Text cannot be null."); FontSize = FontSize.FromPoints(reader.ReadDouble("FontSize")); Color = reader.ReadColor("Color"); }
public SceneSerializer(ISceneFactory sceneFactory, ISceneBehaviorFactoryProvider sceneBehaviorFactoryProvider, IComponentFactoryProvider componentFactoryProvider, IAssetStore assetStore) { _sceneFactory = sceneFactory; _sceneBehaviorFactoryProvider = sceneBehaviorFactoryProvider; _componentFactoryProvider = componentFactoryProvider; _assetStore = assetStore; }
public RenderingSystemIntegrationTestsSut(IAssetStore assetStore, IDebugRenderer debugRenderer, IRenderingBackend renderingBackend, IRenderingSystem renderingSystem) { AssetStore = assetStore; DebugRenderer = debugRenderer; RenderingBackend = renderingBackend; RenderingSystem = renderingSystem; }
protected internal override void Serialize(IComponentDataWriter writer, IAssetStore assetStore) { base.Serialize(writer, assetStore); writer.WriteInt("IntProperty", IntProperty); writer.WriteDouble("DoubleProperty", DoubleProperty); writer.WriteString("StringProperty", StringProperty); }
public AssetRepository(IAssetStore store, ICacheService cacheService, IUserIdAccesor userIdAccesor, ICacheOptions options) : base(store, cacheService, options) { _userIdAccesor = userIdAccesor; }
public void SetUp() { _assetStore = Substitute.For <IAssetStore>(); _sceneLoader = Substitute.For <ISceneLoader>(); _sceneFactory = Substitute.For <ISceneFactory>(); _sceneBehaviorFactoryProvider = Substitute.For <ISceneBehaviorFactoryProvider>(); _sceneBehaviorFactoryProvider.Get(Arg.Any <string>()).ThrowsForAnyArgs(new InvalidOperationException("Missing substitute configuration.")); _sceneManager = new SceneManager(_assetStore, _sceneLoader, _sceneFactory, _sceneBehaviorFactoryProvider); }
public SandboxSystem(IAssetStore assetStore, IEngineManager engineManager, ISceneLoader sceneLoader, ISceneManager sceneManager, IAudioBackend audioBackend) { _assetStore = assetStore; _engineManager = engineManager; _sceneLoader = sceneLoader; _sceneManager = sceneManager; _audioPlayer = audioBackend.AudioPlayer; }
public DefaultAssetFileStore( IAssetStore assetStore, IAssetRepository assetRepository, IOptions <AssetOptions> options) { this.assetStore = assetStore; this.assetRepository = assetRepository; this.options = options.Value; }
public SceneManager(IAssetStore assetStore, ISceneLoader sceneLoader, ISceneFactory sceneFactory, ISceneBehaviorFactoryProvider sceneBehaviorFactoryProvider) { _assetStore = assetStore; _sceneLoader = sceneLoader; _sceneFactory = sceneFactory; _sceneBehaviorFactoryProvider = sceneBehaviorFactoryProvider; _sceneLoadRequest.MarkAsHandled(); }
protected override void Serialize(IComponentDataWriter writer, IAssetStore assetStore) { base.Serialize(writer, assetStore); writer.WriteDouble("Velocity", Velocity); writer.WriteDouble("X", X); writer.WriteDouble("Y", Y); writer.WriteDouble("Width", Width); writer.WriteDouble("Height", Height); }
protected override void Deserialize(IComponentDataReader reader, IAssetStore assetStore) { base.Deserialize(reader, assetStore); Velocity = reader.ReadDouble("Velocity"); X = reader.ReadDouble("X"); Y = reader.ReadDouble("Y"); Width = reader.ReadDouble("Width"); Height = reader.ReadDouble("Height"); }
public BackupAssets(IStore <Guid> store, IAssetStore assetStore, ITagService tagService) : base(store) { Guard.NotNull(assetStore); Guard.NotNull(tagService); this.assetStore = assetStore; this.tagService = tagService; }