AsyncData 1.0.0

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package AsyncData --version 1.0.0
                    
NuGet\Install-Package AsyncData -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AsyncData" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AsyncData" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="AsyncData" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AsyncData --version 1.0.0
                    
#r "nuget: AsyncData, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AsyncData@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AsyncData&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=AsyncData&version=1.0.0
                    
Install as a Cake Tool

format this into a readme.md file

AsyncData System Usage Guide Class Definitions and Indexing Dealer

public class Dealer : AsyncDocument<Dealer> { public override string GetCollectionName() ⇒ "dealers"; public AsyncDocumentLinkList<Vehicle> VehicleInventory ⇒ new AsyncDocumentLinkList<Vehicle>(Key); public AsyncDocumentLinkList<Customer> Customers ⇒ new AsyncDocumentLinkList<Customer>(Key); }

Location

public class Location : AsyncDocument<Location>, IIndexable { public override string GetCollectionName() ⇒ "locations"; public AsyncIndexedProperty<string> Name ⇒ new AsyncIndexedProperty<string>(Key); public AsyncIndexedProperty<string> Street ⇒ new AsyncIndexedProperty<string>(Key); public AsyncIndexedProperty<string> City ⇒ new AsyncIndexedProperty<string>(Key); public AsyncIndexedProperty<string> State ⇒ new AsyncIndexedProperty<string>(Key); public AsyncIndexedProperty<string> ZipCode ⇒ new AsyncIndexedProperty<string>(Key); public AsyncIndexedProperty<string> Country ⇒ new AsyncIndexedProperty<string>(Key);

public AsyncProperty<double> Latitude => new AsyncProperty<double>(Key);
public AsyncProperty<double> Longitude => new AsyncProperty<double>(Key);

public AsyncIndexedProperty<string> PhoneNumber => new AsyncIndexedProperty<string>(Key);
public AsyncIndexedProperty<string> Email => new AsyncIndexedProperty<string>(Key);
public AsyncProperty<string> OperatingHours => new AsyncProperty<string>(Key);

public AsyncProperty<string> Type => new AsyncProperty<string>(Key);

public async Task UpdateCoordinatesAsync(double latitude, double longitude)
{
    await Latitude.SetAsync(latitude);
    await Longitude.SetAsync(longitude);
}

public async Task UpdateAddressAsync(string street, string city, string state, string zipCode, string country)
{
    await Street.SetAsync(street);
    await City.SetAsync(city);
    await State.SetAsync(state);
    await ZipCode.SetAsync(zipCode);
    await Country.SetAsync(country);
}

}

Querying Data Here's how you would perform a location-based query:

RedisQuery<Location> query = new RedisQuery<Location>();

// Example: Searching for locations in California query.Tag(s ⇒ s.State, "CA");

// Searching for a specific city within California query.Text(s ⇒ s.City, "Los Angeles", 2);

var queryStr = query.ToString(); if (string.IsNullOrEmpty(queryStr)) { var locations = await Location.GetAllAsync(); result = locations.Select(s ⇒ s.Id).ToList(); } else { result = await RedisIndex.SearchAsync<Location>(query); if (result == null) result = new List<string>(); }

Using Async Properties AsyncProperty can handle various types, including complex classes or models:

public class VehicleProfile : AsyncDescendant<VehicleProfile> { public AsyncProperty<VehicleColor> Color ⇒ new AsyncProperty<VehicleColor>(Key); public AsyncProperty<string> Make ⇒ new AsyncProperty<string>(Key); public AsyncProperty<string> Model ⇒ new AsyncProperty<string>(Key); public AsyncProperty<string> Year ⇒ new AsyncProperty<string>(Key); public AsyncProperty<int> TireCount ⇒ new AsyncProperty<int>(Key); }

// Usage examples var vehicle = Vehicle.Create("vehicleId"); var year = await vehicle.Profile.Year.GetAsync(); // Returns string await vehicle.Profile.Year.SetAsync("2027");

// For a class like VehicleColor var color = await vehicle.Profile.Color.GetAsync(); await vehicle.Profile.Color.SetAsync(new VehicleColor { Name = "Red", Code = "#FF0000" });

Redis Singleton Initialization To connect to your Redis server:

RedisSingleton.Initialize("your-redis-host", port: 6379, "your-redis-password");

async Task Main() { // Initialize Redis connection RedisSingleton.Initialize("localhost", port: 6379, "password");

// Create a dealer and manage its inventory
var dealer = Dealer.Create("dealerId1");
var inventory = await dealer.VehicleInventory.GetAllAsync();

// Create and update vehicle details
var vehicle = Vehicle.Create("vehicleId");
await vehicle.Profile.Year.SetAsync("2027");

// Query for locations
var query = new RedisQuery<Location>();
query.Tag(s => s.State, "CA");
var locations = await RedisIndex.SearchAsync<Location>(query);

foreach (var loc in locations)
{
    Console.WriteLine($"Found Location: {loc.City.GetAsync().Result}, {loc.State.GetAsync().Result}");
}

}

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated