-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added HcObjectTypeEnum to HoloOASIS Provider.
- Added new IHcObject interface HoloOASIS Provider to allow to make the code even more generic and efficient. - IHcAvatar and IHcAvatarDetail interfaces now extend the new IHcObject interface. - Moved IHcAvatar, IHcAvatarDetail & IHcObject interfaces to new Interfaces folder. - Finished implementing missing properties from IHolonBase interface to HcAvatarDetail in HoloOASIS Provider. - Updated LoadAvatarAsync, LoadAvatar, LoadAvatarByEmailAsync & LoadAvatarByEmail methods in HoloOASIS Provider. - Changed ConvertHcAvatarToAvatar method return type to IAvatar in HoloOASIS Provider. - Added ConvertKeyValuePairToAvatar method to HoloOASIS Provider. - Added ConvertHcAvatarDetailToAvatarDetail method to HoloOASIS Provider. - Added ConvertKeyValuePairToAvatarDetail method to HoloOASIS Provider. - Updated generic LoadAsync & Load methods in HoloOASIS Provider to make it even more efficient so all load operations now go through it. - Added new HandleResponse method to HoloOASIS Provider. - Started adding new generic SaveAsync method to HoloOASIS Provider.
- Loading branch information
Showing
9 changed files
with
350 additions
and
236 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
NextGenSoftware.OASIS.API.Providers.HoloOASIS.Core/Enums/HcObjectTypeEnum.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
| ||
namespace NextGenSoftware.OASIS.API.Providers.HoloOASIS | ||
{ | ||
public enum HcObjectTypeEnum | ||
{ | ||
Avatar, | ||
AvatarDetail, | ||
Holon | ||
} | ||
} |
385 changes: 162 additions & 223 deletions
385
NextGenSoftware.OASIS.API.Providers.HoloOASIS.Core/HoloOASIS.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
NextGenSoftware.OASIS.API.Providers.HoloOASIS.Core/Interfaces/IHcObject.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
| ||
using NextGenSoftware.Holochain.HoloNET.Client; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
|
||
namespace NextGenSoftware.OASIS.API.Providers.HoloOASIS | ||
{ | ||
public interface IHcObject // : IHoloNETAuditEntryBaseClass | ||
{ | ||
//TODO: Temp until release new version of HoloNET with interfaces defined. | ||
List<HoloNETAuditEntry> AuditEntries { get; set; } | ||
string CreatedBy { get; set; } | ||
DateTime CreatedDate { get; set; } | ||
string DeletedBy { get; set; } | ||
DateTime DeletedDate { get; set; } | ||
Guid Id { get; set; } | ||
bool IsActive { get; set; } | ||
bool IsAuditAgentCreateModifyDeleteFieldsEnabled { get; set; } | ||
bool IsAuditTrackingEnabled { get; set; } | ||
bool IsVersionTrackingEnabled { get; set; } | ||
string ModifiedBy { get; set; } | ||
DateTime ModifiedDate { get; set; } | ||
int Version { get; set; } | ||
|
||
EntryData EntryData { get; set; } | ||
string EntryHash { get; set; } | ||
HoloNETClient HoloNETClient { get; set; } | ||
bool IsInitialized { get; } | ||
bool IsInitializing { get; } | ||
string PreviousVersionEntryHash { get; set; } | ||
string ZomeCreateCollectionFunction { get; set; } | ||
string ZomeCreateEntryFunction { get; set; } | ||
string ZomeDeleteCollectionFunction { get; set; } | ||
string ZomeDeleteEntryFunction { get; set; } | ||
string ZomeLoadCollectionFunction { get; set; } | ||
string ZomeLoadEntryFunction { get; set; } | ||
string ZomeName { get; set; } | ||
string ZomeUpdateCollectionFunction { get; set; } | ||
string ZomeUpdateEntryFunction { get; set; } | ||
|
||
event HoloNETEntryBaseClass.Closed OnClosed; | ||
event HoloNETEntryBaseClass.Deleted OnDeleted; | ||
event HoloNETEntryBaseClass.Error OnError; | ||
event HoloNETEntryBaseClass.Initialized OnInitialized; | ||
event HoloNETEntryBaseClass.Loaded OnLoaded; | ||
event HoloNETEntryBaseClass.Saved OnSaved; | ||
|
||
HoloNETShutdownEventArgs Close(ShutdownHolochainConductorsMode shutdownHolochainConductorsMode = ShutdownHolochainConductorsMode.UseConfigSettings); | ||
Task<HoloNETShutdownEventArgs> CloseAsync(DisconnectedCallBackMode disconnectedCallBackMode = DisconnectedCallBackMode.WaitForHolochainConductorToDisconnect, ShutdownHolochainConductorsMode shutdownHolochainConductorsMode = ShutdownHolochainConductorsMode.UseConfigSettings); | ||
ZomeFunctionCallBackEventArgs Delete(); | ||
ZomeFunctionCallBackEventArgs Delete(object customFieldToLoadByValue); | ||
ZomeFunctionCallBackEventArgs Delete(string entryHash); | ||
Task<ZomeFunctionCallBackEventArgs> DeleteAsync(); | ||
Task<ZomeFunctionCallBackEventArgs> DeleteAsync(object customFieldToLoadByValue); | ||
Task<ZomeFunctionCallBackEventArgs> DeleteAsync(string entryHash); | ||
void Initialize(bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateConfigWithAgentPubKeyAndDnaHashOnceRetrieved = true); | ||
Task InitializeAsync(ConnectedCallBackMode connectedCallBackMode = ConnectedCallBackMode.WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = RetrieveAgentPubKeyAndDnaHashMode.Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateConfigWithAgentPubKeyAndDnaHashOnceRetrieved = true); | ||
ZomeFunctionCallBackEventArgs Load(bool useReflectionToMapOntoEntryDataObject = true); | ||
ZomeFunctionCallBackEventArgs Load(object customFieldToLoadByValue, bool useReflectionToMapOntoEntryDataObject = true); | ||
ZomeFunctionCallBackEventArgs Load(string entryHash, bool useReflectionToMapOntoEntryDataObject = true); | ||
Task<ZomeFunctionCallBackEventArgs> LoadAsync(bool useReflectionToMapOntoEntryDataObject = true); | ||
Task<ZomeFunctionCallBackEventArgs> LoadAsync(object customFieldToLoadByValue, bool useReflectionToMapOntoEntryDataObject = true); | ||
Task<ZomeFunctionCallBackEventArgs> LoadAsync(string entryHash, bool useReflectionToMapOntoEntryDataObject = true); | ||
ZomeFunctionCallBackEventArgs LoadCollection(string collectionAnchor); | ||
Task<ZomeFunctionCallBackEventArgs> LoadCollectionAsync(string collectionAnchor); | ||
ZomeFunctionCallBackEventArgs Save(Dictionary<string, string> customDataKeyValuePair = null, Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePair = null, bool cachePropertyInfos = true); | ||
ZomeFunctionCallBackEventArgs Save(dynamic paramsObject); | ||
Task<ZomeFunctionCallBackEventArgs> SaveAsync(Dictionary<string, string> customDataKeyValuePair = null, Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePair = null, bool cachePropertyInfos = true); | ||
Task<ZomeFunctionCallBackEventArgs> SaveAsync(dynamic paramsObject); | ||
Task<ReadyForZomeCallsEventArgs> WaitTillHoloNETInitializedAsync(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters