mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-06-27 05:23:13 +00:00
cipher
This commit is contained in:
@ -11,14 +11,14 @@
|
||||
<PackageProjectUrl>http://www.esiur.com</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/esiur/esiur-dotnet/</RepositoryUrl>
|
||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
||||
<Version>1.5.5</Version>
|
||||
<Version>1.5.6</Version>
|
||||
<PackageId>Esiur.Stores.MongoDB</PackageId>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MongoDB.Bson" Version="2.12.3" />
|
||||
<PackageReference Include="MongoDB.Driver" Version="2.12.3" />
|
||||
<PackageReference Include="MongoDB.Bson" Version="2.24.0" />
|
||||
<PackageReference Include="MongoDB.Driver" Version="2.24.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -51,15 +51,15 @@ public class MongoDBStore : IStore
|
||||
KeyList<string, WeakReference> resources = new KeyList<string, WeakReference>();
|
||||
|
||||
|
||||
[Public]
|
||||
[Export]
|
||||
public event ResourceEventHandler<IResource> ResourceAdded;
|
||||
|
||||
[Public]
|
||||
[Export]
|
||||
public event ResourceEventHandler<IResource> ResourceRemoved;
|
||||
|
||||
int count = 0;
|
||||
|
||||
[Public]
|
||||
[Export]
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
@ -109,7 +109,7 @@ public class MongoDBStore : IStore
|
||||
return true;
|
||||
}
|
||||
|
||||
[Public]
|
||||
[Export]
|
||||
public bool Remove(IResource resource)
|
||||
{
|
||||
var objectId = resource.Instance.Variables["objectId"].ToString();
|
||||
|
@ -35,7 +35,7 @@ namespace Esiur.Stores.MongoDB
|
||||
{
|
||||
public class MongoDBStore<T> : MongoDBStore where T:IResource
|
||||
{
|
||||
[Public]
|
||||
[Export]
|
||||
public async AsyncReply<T> New(string name = null, object properties = null)
|
||||
{
|
||||
var resource = await Warehouse.New<T>(name, this, null, null, null, properties);
|
||||
@ -43,7 +43,7 @@ namespace Esiur.Stores.MongoDB
|
||||
return resource;
|
||||
}
|
||||
|
||||
[Public]
|
||||
[Export]
|
||||
public async AsyncReply<IResource[]> Slice(int index, int limit)
|
||||
{
|
||||
var list = await this.Instance.Children<IResource>();
|
||||
|
Reference in New Issue
Block a user