/// <summary> Default constructor </summary> public AzureBlobGrainStorage( string name, AzureBlobStorageOptions options, IGrainStorageSerializer grainStorageSerializer, IServiceProvider services, ILogger <AzureBlobGrainStorage> logger) { this.name = name; this.options = options; this.grainStorageSerializer = options.GrainStorageSerializer; this.services = services; this.logger = logger; }
/// <summary> Default constructor </summary> public AzureTableGrainStorage( string name, AzureTableStorageOptions options, IOptions <ClusterOptions> clusterOptions, IServiceProvider services, ILogger <AzureTableGrainStorage> logger) { this.options = options; this.clusterOptions = clusterOptions.Value; this.name = name; this.storageSerializer = options.GrainStorageSerializer; this.logger = logger; }
public GrainStorageSerializer(IGrainStorageSerializer serializer, IGrainStorageSerializer fallbackDeserializer) { _serializer = serializer; _fallbackDeserializer = fallbackDeserializer; }
/// <summary> /// Deserializes the provided data. /// </summary> /// <param name="serializer">The grain state serializer.</param> /// <param name="input">The data to deserialize.</param> /// <typeparam name="T">The output type.</typeparam> /// <returns>The deserialized object.</returns> public static T Deserialize <T>(this IGrainStorageSerializer serializer, ReadOnlyMemory <byte> input) => serializer.Deserialize <T>(new BinaryData(input));