NextGenSoftware.Holochain.HoloNET.Client

HoloNETCollectionLoadedResult<T> (class)

Inherits / implements: CallBackBaseEventArgs

Member Kind Description
List<T> EntriesLoaded { get; set; } property The entries the collection loaded.
ZomeFunctionCallBackEventArgs ZomeFunctionCallBackEventArgs { get; set; } property The underlying zome call.

HoloNETCollectionSavedResult (class)

Inherits / implements: CallBackBaseEventArgs

Member Kind Description
List<ZomeFunctionCallBackEventArgs> ConductorResponses { get; set; } property Every zome call the save made.
List<IHoloNETEntryBase> EntiesAdded { get; set; } property Entries added to the collection by this save.
List<IHoloNETEntryBase> EntiesRemoved { get; set; } property Entries removed from the collection by this save.
List<IHoloNETEntryBase> EntiesSaved { get; set; } property Entries created or updated by this save.
List<IHoloNETEntryBase> EntiesSaveErrors { get; set; } property Entries that failed to save (see ErrorMessages).
List<string> ErrorMessages field Why each failed entry failed.

NextGenSoftware.Holochain.HoloNET.ORM

IHoloNETAuditEntry (interface)

Member Kind Description
DateTime DateTime { get; set; } property The datetime the entry was created/updated/deleted.
string EntryHash { get; set; } property This is the hash generated by the Holochain Conductor for the Holochain Entry that the HoloNETEntryBaseClass maps onto. This will be empty until after the first call to the Save method.
HoloNETAuditEntryType Type { get; set; } property The conductor message type.

NextGenSoftware.Holochain.HoloNET.ORM.Collections

Closed<T> (delegate)

Inherits / implements: MulticastDelegate, ICloneable, ISerializable

Handler signature: void Closed(object sender, HoloNETShutdownEventArgs e) (the type of the OnClosed event).

Closed<T> (delegate)

Inherits / implements: MulticastDelegate, ICloneable, ISerializable

Handler signature: void Closed(object sender, HoloNETShutdownEventArgs e) (the type of the OnClosed event).

CollectionLoaded<T> (delegate)

Inherits / implements: MulticastDelegate, ICloneable, ISerializable

Handler signature: void CollectionLoaded(object sender, HoloNETCollectionLoadedResult<T> e) (the type of the OnCollectionLoaded event).

CollectionLoaded<T> (delegate)

Inherits / implements: MulticastDelegate, ICloneable, ISerializable

Handler signature: void CollectionLoaded(object sender, HoloNETCollectionLoadedResult<T> e) (the type of the OnCollectionLoaded event).

CollectionSaved<T> (delegate)

Inherits / implements: MulticastDelegate, ICloneable, ISerializable

Handler signature: void CollectionSaved(object sender, HoloNETCollectionSavedResult e) (the type of the OnCollectionSaved event).

CollectionSaved<T> (delegate)

Inherits / implements: MulticastDelegate, ICloneable, ISerializable

Handler signature: void CollectionSaved(object sender, HoloNETCollectionSavedResult e) (the type of the OnCollectionSaved event).

Error<T> (delegate)

Inherits / implements: MulticastDelegate, ICloneable, ISerializable

Handler signature: void Error(object sender, HoloNETErrorEventArgs e) (the type of the OnError event).

Error<T> (delegate)

Inherits / implements: MulticastDelegate, ICloneable, ISerializable

Handler signature: void Error(object sender, HoloNETErrorEventArgs e) (the type of the OnError event).

HoloNETCollection<T> (class)

Inherits / implements: List<T>, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>

Member Kind Description
HoloNETCollection(string installedAppId, string myAgentPubKey, string zomeName, string zomeLoadCollectionFunction, string zomeAddEntryToCollectionFunction, string zomeRemoveEntryFromCollectionFunction, string zomeBatchUpdateCollectionFunction = "", bool autoCallInitialize = true, IHoloNETDNA holoNETDNA = null, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions for this installed app and agent, creating its own connection (settings from holoNETDNA, or HoloNETDNA.json).
HoloNETCollection(string zomeName, string zomeLoadCollectionFunction, string zomeAddEntryToCollectionFunction, string zomeRemoveEntryFromCollectionFunction, string zomeBatchUpdateCollectionFunction = "", bool autoCallInitialize = true, IHoloNETDNA holoNETDNA = null, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions, creating its own connection (settings from holoNETDNA, or HoloNETDNA.json).
HoloNETCollection(string installedAppId, string myAgentPubKey, string zomeName, string zomeLoadCollectionFunction, string zomeAddEntryToCollectionFunction, string zomeRemoveEntryFromCollectionFunction, ILogProvider logProvider, bool alsoUseDefaultLogger = false, string zomeBatchUpdateCollectionFunction = "", bool autoCallInitialize = true, IHoloNETDNA holoNETDNA = null, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true, bool logToConsole = true, bool logToFile = true, string releativePathToLogFolder = "Logs", string logFileName = "HoloNET.log", bool addAdditionalSpaceAfterEachLogEntry = false, bool showColouredLogs = true, ConsoleColor debugColour = White, ConsoleColor infoColour = Green, ConsoleColor warningColour = Yellow, ConsoleColor errorColour = Red) ctor Map onto the given zome and zome functions for this installed app and agent, creating its own connection, logging to this log provider.
HoloNETCollection(string zomeName, string zomeLoadCollectionFunction, string zomeAddEntryToCollectionFunction, string zomeRemoveEntryFromCollectionFunction, ILogProvider logProvider, bool alsoUseDefaultLogger = false, string zomeBatchUpdateCollectionFunction = "", bool autoCallInitialize = true, IHoloNETDNA holoNETDNA = null, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true, bool logToConsole = true, bool logToFile = true, string releativePathToLogFolder = "Logs", string logFileName = "HoloNET.log", bool addAdditionalSpaceAfterEachLogEntry = false, bool showColouredLogs = true, ConsoleColor debugColour = White, ConsoleColor infoColour = Green, ConsoleColor warningColour = Yellow, ConsoleColor errorColour = Red) ctor Map onto the given zome and zome functions, creating its own connection, logging to this log provider.
HoloNETCollection(string installedAppId, string myAgentPubKey, string zomeName, string zomeLoadCollectionFunction, string zomeAddEntryToCollectionFunction, string zomeRemoveEntryFromCollectionFunction, IEnumerable<ILogProvider> logProviders, string zomeBatchUpdateCollectionFunction = "", bool alsoUseDefaultLogger = false, bool autoCallInitialize = true, IHoloNETDNA holoNETDNA = null, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions for this installed app and agent, creating its own connection, logging to these log providers.
HoloNETCollection(string zomeName, string zomeLoadCollectionFunction, string zomeAddEntryToCollectionFunction, string zomeRemoveEntryFromCollectionFunction, IEnumerable<ILogProvider> logProviders, string zomeBatchUpdateCollectionFunction = "", bool alsoUseDefaultLogger = false, bool autoCallInitialize = true, IHoloNETDNA holoNETDNA = null, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions, creating its own connection, logging to these log providers.
HoloNETCollection(string installedAppId, string myAgentPubKey, string zomeName, string zomeLoadCollectionFunction, string zomeAddEntryToCollectionFunction, string zomeRemoveEntryFromCollectionFunction, ILogger logger, string zomeBatchUpdateCollectionFunction = "", bool autoCallInitialize = true, IHoloNETDNA holoNETDNA = null, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions for this installed app and agent, creating its own connection, logging to this Logger.
HoloNETCollection(string zomeName, string zomeLoadCollectionFunction, string zomeAddEntryToCollectionFunction, string zomeRemoveEntryFromCollectionFunction, ILogger logger, string zomeBatchUpdateCollectionFunction = "", bool autoCallInitialize = true, IHoloNETDNA holoNETDNA = null, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions, creating its own connection, logging to this Logger.
HoloNETCollection(string zomeName, string zomeLoadCollectionFunction, string zomeAddEntryToCollectionFunction, string zomeRemoveEntryFromCollectionFunction, IHoloNETClientAppBase holoNETClient, string zomeBatchUpdateCollectionFunction = "", bool autoCallInitialize = true, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions, using an existing app connection (shared with your other entries and collections).
List<T> EntriesAddedSinceLastSaved { get; } property The entries that have been added since the last time the Save/SaveAsync method has been called. When Save/SaveAsync is next called this list will be emptied once the save is successfull.
List<T> EntriesRemovedSinceLastSaved { get; } property The entries that have been removed since the last time the Save/SaveAsync method has been called. When Save/SaveAsync is next called this list will be emptied once the save is successfull.
IHoloNETClientAppBase HoloNETClient { get; set; } property This is a reference to the internal instance of the HoloNET Client (either the one passed in through a constructor or one created internally.)
bool IsChanges { get; } property This will be true if any chnages have been made to this collection (entries added, removed or updated) since the last time the Save/SaveAsync functions were called. After they have been called it will be reset to false.
bool IsInitialized { get; } property This will return true once HoloNETEntryBaseClass and it's internal HoloNET client have finished initializing and the OnInitialized event has been raised. See also the IsInitializing property and the Initialize method.
bool IsInitializing { get; } property This will return true whilst HoloNETEntryBaseClass and it's internal HoloNET client is initializing. The Initialize method will begin the initialization process. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. Once the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then raised the OnReadyForZomeCalls event it will raise the OnInitialized event. See also the IsInitialized property. |
List<T> OriginalEntries { get; } property This contains the original entries since the last time this collection was loaded or saved.
string ZomeAddEntryToCollectionFunction { get; set; } property The name of the zome function to call to add a HoloNETEntry to a collection.
string ZomeBatchUpdateCollectionFunction { get; set; } property The name of the zome function to call to batch update all changes made to the collection (entries added, removed and updated (optional)),
string ZomeLoadCollectionFunction { get; set; } property The name of the zome function to call to load a collection of entries.
string ZomeName { get; set; } property This is the name of the rust zome in your hApp that this instance of the HoloNETEntryBaseClass maps onto. You can set this either through this property or through one of the constructors.
string ZomeRemoveEntryFromCollectionFunction { get; set; } property The name of the zome function to call to remove a HoloNETEntry from a collection.
Closed<T> OnClosed event Fired after the Close method has finished closing the connection to the Holochain Conductor and has shutdown all running Holochain Conductors (if configured to do so). This method calls the ShutdownHoloNET internally.
CollectionLoaded<T> OnCollectionLoaded event Fired after the LoadCollection method has finished loading the Holochain Collection from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadCollectionFunction or property ZomeLoadCollectionFunction and then maps the data returned from the zome call onto your collection.
CollectionSaved<T> OnCollectionSaved event Fired after the Save/SaveAsync method has finished saving all HoloNET Entries that were either added, removed or updated. This may optionally update the collection in one batch operation. See Save/SaveAsync for more info.
Error<T> OnError event Fired when there is an error either in HoloNETEntryBaseClass or the HoloNET client itself.
HoloNETEntryAddedToCollection<T> OnHoloNETEntryAddedToCollection event Fired after an HoloNET Entry has been added to the collection. This can be from either calling the AddHoloNETEntryToCollection function or from the SaveCollection function which will automatically add any new entries to the collection. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeAddEntryToCollectionFunction or property ZomeAddEntryToCollectionFunction.
HoloNETEntryRemovedFromCollection<T> OnHoloNETEntryRemovedFromCollection event Fired after an HoloNET Entry has been removed from the collection. This can be from either calling the RemoveHoloNETEntryFromCollection function or from the SaveCollection function which will automatically remove any old entries from the collection (ones that have been removed in c# client side code but not yet synced with the rust backend code). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeRemoveEntryToCollectionFunction or property ZomeRemoveEntryToCollectionFunction.
Initialized<T> OnInitialized event Fired after the Initialize method has finished initializing the HoloNET client. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. This event is then fired when the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then fired the OnReadyForZomeCalls event. See also the IsInitializing and the IsInitialized properties.
ZomeFunctionCallBackEventArgs AddHoloNETEntryToCollectionAndSave(T holoNETEntry, bool saveHoloNETEntry = true, string collectionAnchor = "") method This method will add the HoloNETEntry to the collection. If 'saveHoloNETEntry' is set to true (default) it will call the SaveAsync method on the HoloNETEntry before adding it to the collection. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param 'zomeAddEntryToCollectionFunction' or property 'ZomeAddEntryToCollectionFunction'. It will then raise the OnHoloNETEntryAddedToCollection event.
Task<ZomeFunctionCallBackEventArgs> AddHoloNETEntryToCollectionAndSaveAsync(T holoNETEntry, bool saveHoloNETEntry = true, string collectionAnchor = "", bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will add the HoloNETEntry to the collection. If 'saveHoloNETEntry' is set to true (default) it will call the SaveAsync method on the HoloNETEntry before adding it to the collection. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param 'zomeAddEntryToCollectionFunction' or property 'ZomeAddEntryToCollectionFunction'. It will then raise the OnHoloNETEntryAddedToCollection event.
HoloNETShutdownEventArgs Close(ShutdownHolochainConductorsMode shutdownHolochainConductorsMode = UseHoloNETDNASettings) method Will close this HoloNET Entry and then shutdown its internal HoloNET instance (if one was not passed in) and its current connetion to the Holochain Conductor and then shutdown all running Holochain Conductors (if configured to do so) as well as any other tasks to shut HoloNET down cleanly. This method calls the ShutdownHoloNET method internally. Once it has finished shutting down HoloNET it will raise the OnClosed event. You can specify if HoloNET should wait until it has finished disconnecting and shutting down the conductors before returning to the caller or whether it should return immediately and then use the OnDisconnected, OnHolochainConductorsShutdownComplete & OnHoloNETShutdownComplete events to notify the caller.
Task<HoloNETShutdownEventArgs> CloseAsync(DisconnectedCallBackMode disconnectedCallBackMode = WaitForHolochainConductorToDisconnect, ShutdownHolochainConductorsMode shutdownHolochainConductorsMode = UseHoloNETDNASettings) method Will close this HoloNET Entry and then shutdown its internal HoloNET instance (if one was not passed in) and its current connetion to the Holochain Conductor and then shutdown all running Holochain Conductors (if configured to do so) as well as any other tasks to shut HoloNET down cleanly. This method calls the ShutdownHoloNET method internally. Once it has finished shutting down HoloNET it will raise the OnClosed event. You can specify if HoloNET should wait until it has finished disconnecting and shutting down the conductors before returning to the caller or whether it should return immediately and then use the OnDisconnected, OnHolochainConductorsShutdownComplete & OnHoloNETShutdownComplete events to notify the caller.
void Initialize(bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) method This method will Initialize the HoloNETEntryBaseClass along with the internal HoloNET Client and will raise the OnInitialized event once it has finished initializing. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. Once the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then raised the OnReadyForZomeCalls event it will raise the OnInitialized event. See also the IsInitializing and the IsInitialized properties.
Task InitializeAsync(ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) method This method will Initialize the HoloNETEntryBaseClass along with the internal HoloNET Client and will raise the OnInitialized event once it has finished initializing. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. Once the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then raised the OnReadyForZomeCalls event it will raise the OnInitialized event. See also the IsInitializing and the IsInitialized properties.
HoloNETCollectionLoadedResult<T> LoadCollection(string collectionAnchor = "", Dictionary<string, string> customDataKeyValuePairs = null) method This method will load the entries for this collection from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadCollectionFunction or property ZomeLoadCollectionFunction and then maps the data returned from the zome call onto your collection of data objects. It will then raise the OnCollectionLoaded event.
Task<HoloNETCollectionLoadedResult<T>> LoadCollectionAsync(string collectionAnchor = "", Dictionary<string, string> customDataKeyValuePairs = null) method This method will load the entries for this collection from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadCollectionFunction or property ZomeLoadCollectionFunction and then maps the data returned from the zome call onto your collection of data objects. It will then raise the OnCollectionLoaded event.
void ReCalculateEntriesAddedOrRemovedSinceLastSaved() method Recompute EntriesAddedSinceLastSaved / EntriesRemovedSinceLastSaved from the current list.
ZomeFunctionCallBackEventArgs RemoveHoloNETEntryFromCollectionAndSave(T holoNETEntry, string collectionAnchor = "") method This method will remnove the HoloNETEntry from the collection. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param 'zomeRemoveEntryFromCollectionFunction' or property 'ZomeRemoveEntryFromCollectionFunction'. It will then raise the OnHoloNETEntryRemovedFromCollection event.
Task<ZomeFunctionCallBackEventArgs> RemoveHoloNETEntryFromCollectionAndSaveAsync(T holoNETEntry, string collectionAnchor = "") method This method will remnove the HoloNETEntry from the collection. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param 'zomeRemoveEntryFromCollectionFunction' or property 'ZomeRemoveEntryFromCollectionFunction'. It will then raise the OnHoloNETEntryRemovedFromCollection event.
HoloNETCollectionSavedResult SaveAllChanges(bool saveChangesMadeToEntries = true, bool saveAsOneBatchOperation = true, bool saveHoloNETEntryWhenAddingToCollection = true, bool continueOnError = true, string collectionAnchor = "", Dictionary<string, string> customDataKeyValuePairs = null, Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePairs = null, bool cachePropertyInfos = true) method This method will save all changes made to the collection since the last time this method was called and persist the changes to the Holochain Conductor. This includes any entries that were added or removed to the collection via the Add and Remove methods (in-memory only). It also persists any entries that were updated if the 'saveChangesMadeToEntries' param is set to true (defaults to true). If entries were added or removed via the AddHoloNETEntryToCollectionAndSave and RemoveHoloNETEntryFromCollectionAndSave methods then these entries will NOT be added/removed again. If the 'saveAsOneBatchOperation' param is set to true (default), any new entries added, old entries removed or entries changed will be updated as one batch operation. This will be faster than making many seperate calls for adding, remove or updating entries. For this to work you need to make sure the 'ZomeBatchUpdateCollectionFunction' is set or was passed in via one of the constructors, it will then batch update any entries that have changed (added, removed or changed) since the last time this method was called. If 'saveAsOneBatchOperation' is set to false then it will call the SaveAsync method for updating each entry (if 'saveChangesMadeToEntries' is set to true), 'AddHoloNETEntryToCollectionAndSaveAsync' for adding new entries and 'RemoveHoloNETEntryFromCollectionAndSaveAsync' for removing old entries. This of course will be slower than updating them as a batch depending on the size of the collection. This will invoke the 'OnCollectionSaved' event once it has finished saving any changes to the collection.
Task<HoloNETCollectionSavedResult> SaveAllChangesAsync(bool saveChangesMadeToEntries = true, bool saveAsOneBatchOperation = true, bool saveHoloNETEntryWhenAddingToCollection = true, bool continueOnError = true, string collectionAnchor = "", Dictionary<string, string> customDataKeyValuePairs = null, Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePairs = null, bool cachePropertyInfos = true) method This method will save all changes made to the collection since the last time this method was called and persist the changes to the Holochain Conductor. This includes any entries that were added or removed to the collection via the Add and Remove methods (in-memory only). It also persists any entries that were updated if the 'saveChangesMadeToEntries' param is set to true (defaults to true). If entries were added or removed via the AddHoloNETEntryToCollectionAndSave and RemoveHoloNETEntryFromCollectionAndSave methods then these entries will NOT be added/removed again. If the 'saveAsOneBatchOperation' param is set to true (default), any new entries added, old entries removed or entries changed will be updated as one batch operation. This will be faster than making many seperate calls for adding, remove or updating entries. For this to work you need to make sure the 'ZomeBatchUpdateCollectionFunction' is set or was passed in via one of the constructors, it will then batch update any entries that have changed (added, removed or changed) since the last time this method was called. If 'saveAsOneBatchOperation' is set to false then it will call the SaveAsync method for updating each entry (if 'saveChangesMadeToEntries' is set to true), 'AddHoloNETEntryToCollectionAndSaveAsync' for adding new entries and 'RemoveHoloNETEntryFromCollectionAndSaveAsync' for removing old entries. This of course will be slower than updating them as a batch depending on the size of the collection. This will invoke the 'OnCollectionSaved' event once it has finished saving any changes to the collection.
void UpdateEnriesState(Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePairs = null, bool cachePropertyInfos = true) method Updates the collection's entries state (added, removed or updated).
Task<ReadyForZomeCallsEventArgs> WaitTillHoloNETInitializedAsync() method This mehod will call the WaitTillReadyForZomeCallsAsync method on the HoloNET Client.

HoloNETEntryAddedToCollection<T> (delegate)

Inherits / implements: MulticastDelegate, ICloneable, ISerializable

Handler signature: void HoloNETEntryAddedToCollection(object sender, ZomeFunctionCallBackEventArgs e) (the type of the OnHoloNETEntryAddedToCollection event).

HoloNETEntryAddedToCollection<T> (delegate)

Inherits / implements: MulticastDelegate, ICloneable, ISerializable

Handler signature: void HoloNETEntryAddedToCollection(object sender, ZomeFunctionCallBackEventArgs e) (the type of the OnHoloNETEntryAddedToCollection event).

HoloNETEntryRemovedFromCollection<T> (delegate)

Inherits / implements: MulticastDelegate, ICloneable, ISerializable

Handler signature: void HoloNETEntryRemovedFromCollection(object sender, ZomeFunctionCallBackEventArgs e) (the type of the OnHoloNETEntryRemovedFromCollection event).

HoloNETEntryRemovedFromCollection<T> (delegate)

Inherits / implements: MulticastDelegate, ICloneable, ISerializable

Handler signature: void HoloNETEntryRemovedFromCollection(object sender, ZomeFunctionCallBackEventArgs e) (the type of the OnHoloNETEntryRemovedFromCollection event).

HoloNETObservableCollection<T> (class)

Inherits / implements: ObservableCollection<T>, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>

Member Kind Description
HoloNETObservableCollection(string installedAppId, string myAgentPubKey, string zomeName, string zomeLoadCollectionFunction, string zomeAddEntryToCollectionFunction, string zomeRemoveEntryFromCollectionFunction, string zomeBatchUpdateCollectionFunction = "", bool autoCallInitialize = true, IHoloNETDNA holoNETDNA = null, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions for this installed app and agent, creating its own connection (settings from holoNETDNA, or HoloNETDNA.json).
HoloNETObservableCollection(string zomeName, string zomeLoadCollectionFunction, string zomeAddEntryToCollectionFunction, string zomeRemoveEntryFromCollectionFunction, string zomeBatchUpdateCollectionFunction = "", bool autoCallInitialize = true, IHoloNETDNA holoNETDNA = null, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions, creating its own connection (settings from holoNETDNA, or HoloNETDNA.json).
HoloNETObservableCollection(string installedAppId, string myAgentPubKey, string zomeName, string zomeLoadCollectionFunction, string zomeAddEntryToCollectionFunction, string zomeRemoveEntryFromCollectionFunction, ILogProvider logProvider, bool alsoUseDefaultLogger = false, string zomeBatchUpdateCollectionFunction = "", bool autoCallInitialize = true, IHoloNETDNA holoNETDNA = null, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true, bool logToConsole = true, bool logToFile = true, string releativePathToLogFolder = "Logs", string logFileName = "HoloNET.log", bool addAdditionalSpaceAfterEachLogEntry = false, bool showColouredLogs = true, ConsoleColor debugColour = White, ConsoleColor infoColour = Green, ConsoleColor warningColour = Yellow, ConsoleColor errorColour = Red) ctor Map onto the given zome and zome functions for this installed app and agent, creating its own connection, logging to this log provider.
HoloNETObservableCollection(string zomeName, string zomeLoadCollectionFunction, string zomeAddEntryToCollectionFunction, string zomeRemoveEntryFromCollectionFunction, ILogProvider logProvider, bool alsoUseDefaultLogger = false, string zomeBatchUpdateCollectionFunction = "", bool autoCallInitialize = true, IHoloNETDNA holoNETDNA = null, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true, bool logToConsole = true, bool logToFile = true, string releativePathToLogFolder = "Logs", string logFileName = "HoloNET.log", bool addAdditionalSpaceAfterEachLogEntry = false, bool showColouredLogs = true, ConsoleColor debugColour = White, ConsoleColor infoColour = Green, ConsoleColor warningColour = Yellow, ConsoleColor errorColour = Red) ctor Map onto the given zome and zome functions, creating its own connection, logging to this log provider.
HoloNETObservableCollection(string installedAppId, string myAgentPubKey, string zomeName, string zomeLoadCollectionFunction, string zomeAddEntryToCollectionFunction, string zomeRemoveEntryFromCollectionFunction, IEnumerable<ILogProvider> logProviders, string zomeBatchUpdateCollectionFunction = "", bool alsoUseDefaultLogger = false, bool autoCallInitialize = true, IHoloNETDNA holoNETDNA = null, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions for this installed app and agent, creating its own connection, logging to these log providers.
HoloNETObservableCollection(string zomeName, string zomeLoadCollectionFunction, string zomeAddEntryToCollectionFunction, string zomeRemoveEntryFromCollectionFunction, IEnumerable<ILogProvider> logProviders, string zomeBatchUpdateCollectionFunction = "", bool alsoUseDefaultLogger = false, bool autoCallInitialize = true, IHoloNETDNA holoNETDNA = null, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions, creating its own connection, logging to these log providers.
HoloNETObservableCollection(string installedAppId, string myAgentPubKey, string zomeName, string zomeLoadCollectionFunction, string zomeAddEntryToCollectionFunction, string zomeRemoveEntryFromCollectionFunction, ILogger logger, string zomeBatchUpdateCollectionFunction = "", bool autoCallInitialize = true, IHoloNETDNA holoNETDNA = null, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions for this installed app and agent, creating its own connection, logging to this Logger.
HoloNETObservableCollection(string zomeName, string zomeLoadCollectionFunction, string zomeAddEntryToCollectionFunction, string zomeRemoveEntryFromCollectionFunction, Logger logger, string zomeBatchUpdateCollectionFunction = "", bool autoCallInitialize = true, IHoloNETDNA holoNETDNA = null, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions, creating its own connection (settings from holoNETDNA, or HoloNETDNA.json).
HoloNETObservableCollection(string zomeName, string zomeLoadCollectionFunction, string zomeAddEntryToCollectionFunction, string zomeRemoveEntryFromCollectionFunction, IHoloNETClientAppBase holoNETClient, string zomeBatchUpdateCollectionFunction = "", bool autoCallInitialize = true, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions, using an existing app connection (shared with your other entries and collections).
List<T> EntriesAddedSinceLastSaved { get; } property The entries that have been added since the last time the Save/SaveAsync method has been called. When Save/SaveAsync is next called this list will be emptied once the save is successfull.
List<T> EntriesRemovedSinceLastSaved { get; } property The entries that have been removed since the last time the Save/SaveAsync method has been called. When Save/SaveAsync is next called this list will be emptied once the save is successfull.
IHoloNETClientAppBase HoloNETClient { get; set; } property This is a reference to the internal instance of the HoloNET Client (either the one passed in through a constructor or one created internally.)
bool IsChanges { get; } property This will be true if any chnages have been made to this collection (entries added, removed or updated) since the last time the Save/SaveAsync functions were called. After they have been called it will be reset to false.
bool IsInitialized { get; } property This will return true once HoloNETEntryBaseClass and it's internal HoloNET client have finished initializing and the OnInitialized event has been raised. See also the IsInitializing property and the Initialize method.
bool IsInitializing { get; } property This will return true whilst HoloNETEntryBaseClass and it's internal HoloNET client is initializing. The Initialize method will begin the initialization process. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. Once the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then raised the OnReadyForZomeCalls event it will raise the OnInitialized event. See also the IsInitialized property. |
List<T> OriginalEntries { get; } property This contains the original entries since the last time this collection was loaded or saved.
string ZomeAddEntryToCollectionFunction { get; set; } property The name of the zome function to call to add a HoloNETEntry to a collection.
string ZomeBatchUpdateCollectionFunction { get; set; } property The name of the zome function to call to batch update all changes made to the collection (entries added, removed and updated (optional)),
string ZomeLoadCollectionFunction { get; set; } property The name of the zome function to call to load a collection of entries.
string ZomeName { get; set; } property This is the name of the rust zome in your hApp that this instance of the HoloNETEntryBaseClass maps onto. You can set this either through this property or through one of the constructors.
string ZomeRemoveEntryFromCollectionFunction { get; set; } property The name of the zome function to call to remove a HoloNETEntry from a collection.
Closed<T> OnClosed event Fired after the Close method has finished closing the connection to the Holochain Conductor and has shutdown all running Holochain Conductors (if configured to do so). This method calls the ShutdownHoloNET internally.
CollectionLoaded<T> OnCollectionLoaded event Fired after the LoadCollection method has finished loading the Holochain Collection from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadCollectionFunction or property ZomeLoadCollectionFunction and then maps the data returned from the zome call onto your collection.
CollectionSaved<T> OnCollectionSaved event Fired after the Save/SaveAsync method has finished saving all HoloNET Entries that were either added, removed or updated. This may optionally update the collection in one batch operation. See Save/SaveAsync for more info.
Error<T> OnError event Fired when there is an error either in HoloNETEntryBaseClass or the HoloNET client itself.
HoloNETEntryAddedToCollection<T> OnHoloNETEntryAddedToCollection event Fired after an HoloNET Entry has been added to the collection. This can be from either calling the AddHoloNETEntryToCollection function or from the SaveCollection function which will automatically add any new entries to the collection. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeAddEntryToCollectionFunction or property ZomeAddEntryToCollectionFunction.
HoloNETEntryRemovedFromCollection<T> OnHoloNETEntryRemovedFromCollection event Fired after an HoloNET Entry has been removed from the collection. This can be from either calling the RemoveHoloNETEntryFromCollection function or from the SaveCollection function which will automatically remove any old entries from the collection (ones that have been removed in c# client side code but not yet synced with the rust backend code). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeRemoveEntryToCollectionFunction or property ZomeRemoveEntryToCollectionFunction.
Initialized<T> OnInitialized event Fired after the Initialize method has finished initializing the HoloNET client. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. This event is then fired when the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then fired the OnReadyForZomeCalls event. See also the IsInitializing and the IsInitialized properties.
ZomeFunctionCallBackEventArgs AddHoloNETEntryToCollectionAndSave(T holoNETEntry, bool saveHoloNETEntry = true, string collectionAnchor = "") method This method will add the HoloNETEntry to the collection. If 'saveHoloNETEntry' is set to true (default) it will call the SaveAsync method on the HoloNETEntry before adding it to the collection. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param 'zomeAddEntryToCollectionFunction' or property 'ZomeAddEntryToCollectionFunction'. It will then raise the OnHoloNETEntryAddedToCollection event.
Task<ZomeFunctionCallBackEventArgs> AddHoloNETEntryToCollectionAndSaveAsync(T holoNETEntry, bool saveHoloNETEntry = true, string collectionAnchor = "", bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will add the HoloNETEntry to the collection. If 'saveHoloNETEntry' is set to true (default) it will call the SaveAsync method on the HoloNETEntry before adding it to the collection. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param 'zomeAddEntryToCollectionFunction' or property 'ZomeAddEntryToCollectionFunction'. It will then raise the OnHoloNETEntryAddedToCollection event.
HoloNETShutdownEventArgs Close(ShutdownHolochainConductorsMode shutdownHolochainConductorsMode = UseHoloNETDNASettings) method Will close this HoloNET Entry and then shutdown its internal HoloNET instance (if one was not passed in) and its current connetion to the Holochain Conductor and then shutdown all running Holochain Conductors (if configured to do so) as well as any other tasks to shut HoloNET down cleanly. This method calls the ShutdownHoloNET method internally. Once it has finished shutting down HoloNET it will raise the OnClosed event. You can specify if HoloNET should wait until it has finished disconnecting and shutting down the conductors before returning to the caller or whether it should return immediately and then use the OnDisconnected, OnHolochainConductorsShutdownComplete & OnHoloNETShutdownComplete events to notify the caller.
Task<HoloNETShutdownEventArgs> CloseAsync(DisconnectedCallBackMode disconnectedCallBackMode = WaitForHolochainConductorToDisconnect, ShutdownHolochainConductorsMode shutdownHolochainConductorsMode = UseHoloNETDNASettings) method Will close this HoloNET Entry and then shutdown its internal HoloNET instance (if one was not passed in) and its current connetion to the Holochain Conductor and then shutdown all running Holochain Conductors (if configured to do so) as well as any other tasks to shut HoloNET down cleanly. This method calls the ShutdownHoloNET method internally. Once it has finished shutting down HoloNET it will raise the OnClosed event. You can specify if HoloNET should wait until it has finished disconnecting and shutting down the conductors before returning to the caller or whether it should return immediately and then use the OnDisconnected, OnHolochainConductorsShutdownComplete & OnHoloNETShutdownComplete events to notify the caller.
void Initialize(bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) method This method will Initialize the HoloNETEntryBaseClass along with the internal HoloNET Client and will raise the OnInitialized event once it has finished initializing. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. Once the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then raised the OnReadyForZomeCalls event it will raise the OnInitialized event. See also the IsInitializing and the IsInitialized properties.
Task InitializeAsync(ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) method This method will Initialize the HoloNETEntryBaseClass along with the internal HoloNET Client and will raise the OnInitialized event once it has finished initializing. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. Once the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then raised the OnReadyForZomeCalls event it will raise the OnInitialized event. See also the IsInitializing and the IsInitialized properties.
HoloNETCollectionLoadedResult<T> LoadCollection(string collectionAnchor = "", Dictionary<string, string> customDataKeyValuePairs = null) method This method will load the entries for this collection from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadCollectionFunction or property ZomeLoadCollectionFunction and then maps the data returned from the zome call onto your collection of data objects. It will then raise the OnCollectionLoaded event.
Task<HoloNETCollectionLoadedResult<T>> LoadCollectionAsync(string collectionAnchor = "", Dictionary<string, string> customDataKeyValuePairs = null) method This method will load the entries for this collection from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadCollectionFunction or property ZomeLoadCollectionFunction and then maps the data returned from the zome call onto your collection of data objects. It will then raise the OnCollectionLoaded event.
void ReCalculateEntriesAddedOrRemovedSinceLastSaved() method Recompute EntriesAddedSinceLastSaved / EntriesRemovedSinceLastSaved from the current list.
ZomeFunctionCallBackEventArgs RemoveHoloNETEntryFromCollectionAndSave(T holoNETEntry, string collectionAnchor = "") method This method will remnove the HoloNETEntry from the collection. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param 'zomeRemoveEntryFromCollectionFunction' or property 'ZomeRemoveEntryFromCollectionFunction'. It will then raise the OnHoloNETEntryRemovedFromCollection event.
Task<ZomeFunctionCallBackEventArgs> RemoveHoloNETEntryFromCollectionAndSaveAsync(T holoNETEntry, string collectionAnchor = "") method This method will remnove the HoloNETEntry from the collection. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param 'zomeRemoveEntryFromCollectionFunction' or property 'ZomeRemoveEntryFromCollectionFunction'. It will then raise the OnHoloNETEntryRemovedFromCollection event.
HoloNETCollectionSavedResult SaveAllChanges(bool saveChangesMadeToEntries = true, bool saveAsOneBatchOperation = true, bool saveHoloNETEntryWhenAddingToCollection = true, bool continueOnError = true, string collectionAnchor = "", Dictionary<string, string> customDataKeyValuePairs = null, Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePairs = null, bool cachePropertyInfos = true) method This method will save all changes made to the collection since the last time this method was called and persist the changes to the Holochain Conductor. This includes any entries that were added or removed to the collection via the Add and Remove methods (in-memory only). It also persists any entries that were updated if the 'saveChangesMadeToEntries' param is set to true (defaults to true). If entries were added or removed via the AddHoloNETEntryToCollectionAndSave and RemoveHoloNETEntryFromCollectionAndSave methods then these entries will NOT be added/removed again. If the 'saveAsOneBatchOperation' param is set to true (default), any new entries added, old entries removed or entries changed will be updated as one batch operation. This will be faster than making many seperate calls for adding, remove or updating entries. For this to work you need to make sure the 'ZomeBatchUpdateCollectionFunction' is set or was passed in via one of the constructors, it will then batch update any entries that have changed (added, removed or changed) since the last time this method was called. If 'saveAsOneBatchOperation' is set to false then it will call the SaveAsync method for updating each entry (if 'saveChangesMadeToEntries' is set to true), 'AddHoloNETEntryToCollectionAndSaveAsync' for adding new entries and 'RemoveHoloNETEntryFromCollectionAndSaveAsync' for removing old entries. This of course will be slower than updating them as a batch depending on the size of the collection. This will invoke the 'OnCollectionSaved' event once it has finished saving any changes to the collection.
Task<HoloNETCollectionSavedResult> SaveAllChangesAsync(bool saveChangesMadeToEntries = true, bool saveAsOneBatchOperation = true, bool saveHoloNETEntryWhenAddingToCollection = true, bool continueOnError = true, string collectionAnchor = "", Dictionary<string, string> customDataKeyValuePairs = null, Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePairs = null, bool cachePropertyInfos = true) method This method will save all changes made to the collection since the last time this method was called and persist the changes to the Holochain Conductor. This includes any entries that were added or removed to the collection via the Add and Remove methods (in-memory only). It also persists any entries that were updated if the 'saveChangesMadeToEntries' param is set to true (defaults to true). If entries were added or removed via the AddHoloNETEntryToCollectionAndSave and RemoveHoloNETEntryFromCollectionAndSave methods then these entries will NOT be added/removed again. If the 'saveAsOneBatchOperation' param is set to true (default), any new entries added, old entries removed or entries changed will be updated as one batch operation. This will be faster than making many seperate calls for adding, remove or updating entries. For this to work you need to make sure the 'ZomeBatchUpdateCollectionFunction' is set or was passed in via one of the constructors, it will then batch update any entries that have changed (added, removed or changed) since the last time this method was called. If 'saveAsOneBatchOperation' is set to false then it will call the SaveAsync method for updating each entry (if 'saveChangesMadeToEntries' is set to true), 'AddHoloNETEntryToCollectionAndSaveAsync' for adding new entries and 'RemoveHoloNETEntryFromCollectionAndSaveAsync' for removing old entries. This of course will be slower than updating them as a batch depending on the size of the collection. This will invoke the 'OnCollectionSaved' event once it has finished saving any changes to the collection.
void UpdateEnriesState(Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePairs = null, bool cachePropertyInfos = true) method Updates the collection's entries state (added, removed or updated).
Task<ReadyForZomeCallsEventArgs> WaitTillHoloNETInitializedAsync() method This mehod will call the WaitTillReadyForZomeCallsAsync method on the HoloNET Client.

Initialized<T> (delegate)

Inherits / implements: MulticastDelegate, ICloneable, ISerializable

Handler signature: void Initialized(object sender, ReadyForZomeCallsEventArgs e) (the type of the OnInitialized event).

Initialized<T> (delegate)

Inherits / implements: MulticastDelegate, ICloneable, ISerializable

Handler signature: void Initialized(object sender, ReadyForZomeCallsEventArgs e) (the type of the OnInitialized event).

NextGenSoftware.Holochain.HoloNET.ORM.Entries

HoloNETEntryBase.Closed (delegate)

Inherits / implements: MulticastDelegate, ICloneable, ISerializable

Handler signature: void Closed(object sender, HoloNETShutdownEventArgs e) (the type of the OnClosed event).

HoloNETEntryBase.Deleted (delegate)

Inherits / implements: MulticastDelegate, ICloneable, ISerializable

Handler signature: void Deleted(object sender, ZomeFunctionCallBackEventArgs e) (the type of the OnDeleted event).

HoloNETEntryBase.Error (delegate)

Inherits / implements: MulticastDelegate, ICloneable, ISerializable

Handler signature: void Error(object sender, HoloNETErrorEventArgs e) (the type of the OnError event).

HoloNETAuditEntry (class)

Contains audit information for a Holochain Entry.

Inherits / implements: IHoloNETAuditEntry

Member Kind Description
DateTime DateTime { get; set; } property The datetime the entry was created/updated/deleted.
string EntryHash { get; set; } property The entry hash.
HoloNETAuditEntryType Type { get; set; } property The audit action (created, updated or deleted).

HoloNETAuditEntryBase (abstract class)

Inherits / implements: HoloNETEntryBase, IHoloNETEntryBase, IHoloNETAuditEntryBase

Member Kind Description
HoloNETAuditEntryBase(string installedAppId, string myAgentPubKey, string zomeName, string zomeLoadEntryFunction, string zomeCreateEntryFunction, string zomeUpdateEntryFunction, string zomeDeleteEntryFunction, bool createHoloNETClientConnection = true, IHoloNETDNA holoNETDNA = null, bool isVersionTrackingEnabled = true, bool isAuditTrackingEnabled = true, bool isAuditAgentCreateModifyDeleteFieldsEnabled = true, bool isGenerateUniqueGuidIdEnabled = true, bool isActiveFlagEnabled = true, bool autoCallInitialize = true, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateConfigWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions for this installed app and agent, creating its own connection (settings from holoNETDNA, or HoloNETDNA.json).
HoloNETAuditEntryBase(string zomeName, string zomeLoadEntryFunction, string zomeCreateEntryFunction, string zomeUpdateEntryFunction, string zomeDeleteEntryFunction, bool createHoloNETClientConnection = true, IHoloNETDNA holoNETDNA = null, bool isVersionTrackingEnabled = true, bool isAuditTrackingEnabled = true, bool isAuditAgentCreateModifyDeleteFieldsEnabled = true, bool isGenerateUniqueGuidIdEnabled = true, bool isActiveFlagEnabled = true, bool autoCallInitialize = true, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateConfigWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions, creating its own connection (settings from holoNETDNA, or HoloNETDNA.json).
HoloNETAuditEntryBase(string installedAppId, string myAgentPubKey, string zomeName, string zomeLoadEntryFunction, string zomeCreateEntryFunction, string zomeUpdateEntryFunction, string zomeDeleteEntryFunction, ILogProvider logProvider, bool alsoUseDefaultLogger = false, bool createHoloNETClientConnection = true, IHoloNETDNA holoNETDNA = null, bool isVersionTrackingEnabled = true, bool isAuditTrackingEnabled = true, bool isAuditAgentCreateModifyDeleteFieldsEnabled = true, bool isGenerateUniqueGuidIdEnabled = true, bool isActiveFlagEnabled = true, bool autoCallInitialize = true, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateConfigWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions for this installed app and agent, creating its own connection, logging to this log provider.
HoloNETAuditEntryBase(string zomeName, string zomeLoadEntryFunction, string zomeCreateEntryFunction, string zomeUpdateEntryFunction, string zomeDeleteEntryFunction, ILogProvider logProvider, bool alsoUseDefaultLogger = false, bool createHoloNETClientConnection = true, IHoloNETDNA holoNETDNA = null, bool isVersionTrackingEnabled = true, bool isAuditTrackingEnabled = true, bool isAuditAgentCreateModifyDeleteFieldsEnabled = true, bool isGenerateUniqueGuidIdEnabled = true, bool isActiveFlagEnabled = true, bool autoCallInitialize = true, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateConfigWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions, creating its own connection, logging to this log provider.
HoloNETAuditEntryBase(string installedAppId, string myAgentPubKey, string zomeName, string zomeLoadEntryFunction, string zomeCreateEntryFunction, string zomeUpdateEntryFunction, string zomeDeleteEntryFunction, IEnumerable<ILogProvider> logProviders, bool alsoUseDefaultLogger = false, bool createHoloNETClientConnection = true, IHoloNETDNA holoNETDNA = null, bool isVersionTrackingEnabled = true, bool isAuditTrackingEnabled = true, bool isAuditAgentCreateModifyDeleteFieldsEnabled = true, bool isGenerateUniqueGuidIdEnabled = true, bool isActiveFlagEnabled = true, bool autoCallInitialize = true, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateConfigWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions for this installed app and agent, creating its own connection, logging to these log providers.
HoloNETAuditEntryBase(string zomeName, string zomeLoadEntryFunction, string zomeCreateEntryFunction, string zomeUpdateEntryFunction, string zomeDeleteEntryFunction, IEnumerable<ILogProvider> logProviders, bool alsoUseDefaultLogger = false, bool createHoloNETClientConnection = true, IHoloNETDNA holoNETDNA = null, bool isVersionTrackingEnabled = true, bool isAuditTrackingEnabled = true, bool isAuditAgentCreateModifyDeleteFieldsEnabled = true, bool isGenerateUniqueGuidIdEnabled = true, bool isActiveFlagEnabled = true, bool autoCallInitialize = true, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateConfigWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions, creating its own connection, logging to these log providers.
HoloNETAuditEntryBase(string installedAppId, string myAgentPubKey, string zomeName, string zomeLoadEntryFunction, string zomeCreateEntryFunction, string zomeUpdateEntryFunction, string zomeDeleteEntryFunction, ILogger logger, bool createHoloNETClientConnection = true, IHoloNETDNA holoNETDNA = null, bool isVersionTrackingEnabled = true, bool isAuditTrackingEnabled = true, bool isAuditAgentCreateModifyDeleteFieldsEnabled = true, bool isGenerateUniqueGuidIdEnabled = true, bool isActiveFlagEnabled = true, bool autoCallInitialize = true, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateConfigWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions for this installed app and agent, creating its own connection, logging to this Logger.
HoloNETAuditEntryBase(string zomeName, string zomeLoadEntryFunction, string zomeCreateEntryFunction, string zomeUpdateEntryFunction, string zomeDeleteEntryFunction, ILogger logger, bool createHoloNETClientConnection = true, IHoloNETDNA holoNETDNA = null, bool isVersionTrackingEnabled = true, bool isAuditTrackingEnabled = true, bool isAuditAgentCreateModifyDeleteFieldsEnabled = true, bool isGenerateUniqueGuidIdEnabled = true, bool isActiveFlagEnabled = true, bool autoCallInitialize = true, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateConfigWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions, creating its own connection, logging to this Logger.
HoloNETAuditEntryBase(string zomeName, string zomeLoadEntryFunction, string zomeCreateEntryFunction, string zomeUpdateEntryFunction, string zomeDeleteEntryFunction, IHoloNETClientAppBase holoNETClient, bool isVersionTrackingEnabled = true, bool isAuditTrackingEnabled = true, bool isAuditAgentCreateModifyDeleteFieldsEnabled = true, bool isGenerateUniqueGuidIdEnabled = true, bool isActiveFlagEnabled = true, bool autoCallInitialize = true, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateConfigWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions, using an existing app connection (shared with your other entries and collections).
List<IHoloNETAuditEntry> AuditEntries { get; set; } property This contains a collection of audit enties that allow you to track every action that was taken on the Holochain Entry that this instance of the HoloNETAuditEntryBaseClass maps onto. Each audit entry contains the EntryHash, DateTime & the Type (Create, Modify or Delete). |
string CreatedBy { get; set; } property The AgentId who created the entry.
DateTime CreatedDate { get; set; } property The date the entry was created.
string DeletedBy { get; set; } property The AgentId who deleted the entry.
DateTime DeletedDate { get; set; } property The date the entry was soft deleted.
Guid Id { get; set; } property GUID Id that is consistent across multiple versions of the entry (each version has a different EntryHash).
bool IsActive { get; set; } property Flag showing the whether this entry is active or not.
bool IsActiveFlagEnabled { get; set; } property Set this to true if you wish to enable the IsActive flag (you will need to make sure your hApp rust code has the is_active flag added to your entry struct).
bool IsAuditAgentCreateModifyDeleteFieldsEnabled { get; set; } property Set this to true if you wish to update the CreatedDate, CreatedBy, ModifiedDate, ModifiedBy, DeletedData & DeletedBy properties each time the entry/object is saved or deleted (you will need to make sure your hApp rust code has the created_date, created_by, modified_date, modified_by, deleted_date & deleted_by fields in your entry struct).
bool IsAuditTrackingEnabled { get; set; } property Set this to true if you wish to enable Audit Tracking (the AuditEntries property will be updated every time the entry/object is saved or deleted).
bool IsGenerateUniqueGuidIdEnabled { get; set; } property Set this to true if you wish to automatically generate a unique guid id which persists across multiple versions of this HoloNETEntry (the EntryHash will change for each version after you save). You will need to make sure your hApp rust code has the id field in your entry struct.
bool IsVersionTrackingEnabled { get; set; } property Set this to true if you wish to enable Version Tracking (you will need to make sure your hApp rust code has the version field added to your entry struct).
string ModifiedBy { get; set; } property The AgentId who modifed the entry.
DateTime ModifiedDate { get; set; } property The date the entry was last modified.
int Version { get; set; } property The current version of the entry.
ZomeFunctionCallBackEventArgs Delete(Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event. NOTE: This uses the EntryHash property to retrieve the entries hash to soft delete. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBaseClass in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info... This is an optional param where a dictionary containing additional params (KeyValue Pairs) can be passed to the zome function. If this is passed in then the entryHash will automatically be added to the new params with key entry_hash (make sure your hApp zome function is expecting this name)This is an optional param, set this to true (default) to map the data returned from the Holochain Conductor onto the Entry Data Object that extends this base class (HoloNETEntryBaseClass or HoloNETAuditEntryBase). This will have a very small performance overhead but means you do not need to do the mapping yourself from the ZomeFunctionCallBackEventArgs.KeyValuePair.
ZomeFunctionCallBackEventArgs Delete(string entryHash, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBaseClass in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
Task<ZomeFunctionCallBackEventArgs> DeleteAsync(Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event. NOTE: This uses the EntryHash property to retrieve the entries hash to soft delete. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBaseClass in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
Task<ZomeFunctionCallBackEventArgs> DeleteAsync(string entryHash, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBaseClass in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
ZomeFunctionCallBackEventArgs DeleteByCustomField(string customFieldToDeleteByValue, string customFieldToDeleteByKey = "", Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBaseClass in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
Task<ZomeFunctionCallBackEventArgs> DeleteByCustomFieldAsync(string customFieldToDeleteByValue, string customFieldToDeleteByKey = "", Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBaseClass in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
ZomeFunctionCallBackEventArgs Load(int version = 0, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry (it will use the EntryHash property to load from) from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBaseClass in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
ZomeFunctionCallBackEventArgs Load(string entryHash, int version = 0, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event. NOTE: The corresponding rust Holochain Entry in your hApp wil need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBaseClass in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
Task<ZomeFunctionCallBackEventArgs> LoadAsync(int version = 0, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry (it will use the EntryHash property to load from) from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBaseClass in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
Task<ZomeFunctionCallBackEventArgs> LoadAsync(string entryHash, int version = 0, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event. NOTE: The corresponding rust Holochain Entry in your hApp wil need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBaseClass in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
ZomeFunctionCallBackEventArgs LoadByCustomField(string customFieldToLoadByValue, string customFieldToLoadByKey = "", int version = 0, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBaseClass in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
Task<ZomeFunctionCallBackEventArgs> LoadByCustomFieldAsync(string customFieldToLoadByValue, string customFieldToLoadByKey = "", int version = 0, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBaseClass in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
ZomeFunctionCallBackEventArgs Save(Dictionary<string, string> customDataKeyValuePair = null, Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePair = null, bool cachePropertyInfos = true, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method Saves the object and will automatically extrct the properties that need saving (contain the HolochainFieldName attribute). This method uses reflection so has a tiny performance overhead (negligbale), but if you need the extra nanoseconds use the other Save overload passing in your own params object. NOTE: This overload now also allows you to pass in your own params object but it will still dynamically add any properties that have the HolochainFieldName attribute.
ZomeFunctionCallBackEventArgs Save(object paramsObject, bool autoGeneratUpdatedEntryObjectAndOriginalEntryHashRustParams = true, string updatedEntryRustParamName = "updated_entry", string originalEntryHashRustParamName = "original_action_hash", bool addAuditInfoToParams = true, bool addVersionToParams = true, bool addUniqueGuidIdToParams = true, bool addIsActiveFlagToParams = true, string createdDateRustParamName = "created_date", string createdByRustParamName = "created_by", string modifiedDateRustParamName = "modified_date", string modifiedByRustParamName = "modified_by", string deletedDateRustParamName = "deleted_date", string deletedByRustParamName = "deleted_by", string versionRustParamName = "version", string idRustParamName = "id", string isActiveRustParamName = "is_active", bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method Saves the object and will automatically extrct the properties that need saving (contain the HolochainFieldName attribute). This method uses reflection so has a tiny performance overhead (negligbale), but if you need the extra nanoseconds use the other Save overload passing in your own params object. NOTE: This overload now also allows you to pass in your own params object but it will still dynamically add any properties that have the HolochainFieldName attribute.
Task<ZomeFunctionCallBackEventArgs> SaveAsync(Dictionary<string, string> customDataKeyValuePair = null, Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePair = null, bool cachePropertyInfos = true, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method Saves the object and will automatically extrct the properties that need saving (contain the HolochainFieldName attribute). This method uses reflection so has a tiny performance overhead (negligbale), but if you need the extra nanoseconds use the other Save overload passing in your own params object. NOTE: This overload now also allows you to pass in your own params object but it will still dynamically add any properties that have the HolochainFieldName attribute.
Task<ZomeFunctionCallBackEventArgs> SaveAsync(object paramsObject, bool autoGeneratUpdatedEntryObjectAndOriginalEntryHashRustParams = true, string updatedEntryRustParamName = "updated_entry", string originalEntryHashRustParamName = "original_action_hash", bool addAuditInfoToParams = true, bool addVersionToParams = true, bool addUniqueGuidIdToParams = true, bool addIsActiveFlagToParams = true, string createdDateRustParamName = "created_date", string createdByRustParamName = "created_by", string modifiedDateRustParamName = "modified_date", string modifiedByRustParamName = "modified_by", string deletedDateRustParamName = "deleted_date", string deletedByRustParamName = "deleted_by", string versionRustParamName = "version", string idRustParamName = "id", string isActiveRustParamName = "is_active", bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method Saves the object and will automatically extrct the properties that need saving (contain the HolochainFieldName attribute). This method uses reflection so has a tiny performance overhead (negligbale), but if you need the extra nanoseconds use the other Save overload passing in your own params object. NOTE: This overload now also allows you to pass in your own params object but it will still dynamically add any properties that have the HolochainFieldName attribute.

HoloNETEntryBase (abstract class)

Inherits / implements: IHoloNETEntryBase

Member Kind Description
HoloNETEntryBase(string installedAppId, string myAgentPubKey, string zomeName, string zomeLoadEntryFunction, string zomeCreateEntryFunction, string zomeUpdateEntryFunction, string zomeDeleteEntryFunction, bool createHoloNETClientConnection = true, IHoloNETDNA holoNETDNA = null, bool autoCallInitialize = true, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions for this installed app and agent, creating its own connection (settings from holoNETDNA, or HoloNETDNA.json).
HoloNETEntryBase(string zomeName, string zomeLoadEntryFunction, string zomeCreateEntryFunction, string zomeUpdateEntryFunction, string zomeDeleteEntryFunction, bool createHoloNETClientConnection = true, IHoloNETDNA holoNETDNA = null, bool autoCallInitialize = true, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions, creating its own connection (settings from holoNETDNA, or HoloNETDNA.json).
HoloNETEntryBase(string installedAppId, string myAgentPubKey, string zomeName, string zomeLoadEntryFunction, string zomeCreateEntryFunction, string zomeUpdateEntryFunction, string zomeDeleteEntryFunction, ILogProvider logProvider, bool alsoUseDefaultLogger = false, bool createHoloNETClientConnection = true, IHoloNETDNA holoNETDNA = null, bool autoCallInitialize = true, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions for this installed app and agent, creating its own connection, logging to this log provider.
HoloNETEntryBase(string zomeName, string zomeLoadEntryFunction, string zomeCreateEntryFunction, string zomeUpdateEntryFunction, string zomeDeleteEntryFunction, ILogProvider logProvider, bool alsoUseDefaultLogger = false, bool createHoloNETClientConnection = true, IHoloNETDNA holoNETDNA = null, bool autoCallInitialize = true, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions, creating its own connection, logging to this log provider.
HoloNETEntryBase(string installedAppId, string myAgentPubKey, string zomeName, string zomeLoadEntryFunction, string zomeCreateEntryFunction, string zomeUpdateEntryFunction, string zomeDeleteEntryFunction, IEnumerable<ILogProvider> logProviders, bool alsoUseDefaultLogger = false, bool createHoloNETClientConnection = true, IHoloNETDNA holoNETDNA = null, bool autoCallInitialize = true, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions for this installed app and agent, creating its own connection, logging to these log providers.
HoloNETEntryBase(string zomeName, string zomeLoadEntryFunction, string zomeCreateEntryFunction, string zomeUpdateEntryFunction, string zomeDeleteEntryFunction, IEnumerable<ILogProvider> logProviders, bool alsoUseDefaultLogger = false, bool createHoloNETClientConnection = true, IHoloNETDNA holoNETDNA = null, bool autoCallInitialize = true, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions, creating its own connection, logging to these log providers.
HoloNETEntryBase(string installedAppId, string myAgentPubKey, string zomeName, string zomeLoadEntryFunction, string zomeCreateEntryFunction, string zomeUpdateEntryFunction, string zomeDeleteEntryFunction, ILogger logger, bool createHoloNETClientConnection = true, IHoloNETDNA holoNETDNA = null, bool autoCallInitialize = true, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions for this installed app and agent, creating its own connection, logging to this Logger.
HoloNETEntryBase(string zomeName, string zomeLoadEntryFunction, string zomeCreateEntryFunction, string zomeUpdateEntryFunction, string zomeDeleteEntryFunction, ILogger logger, bool createHoloNETClientConnection = true, IHoloNETDNA holoNETDNA = null, bool autoCallInitialize = true, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions, creating its own connection, logging to this Logger.
HoloNETEntryBase(string zomeName, string zomeLoadEntryFunction, string zomeCreateEntryFunction, string zomeUpdateEntryFunction, string zomeDeleteEntryFunction, IHoloNETClientAppBase holoNETClient, bool autoCallInitialize = true, ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) ctor Map onto the given zome and zome functions, using an existing app connection (shared with your other entries and collections).
string ActionHash { get; set; } property The ActionHash.
string EntryHash { get; set; } property The EntryHash.
IHoloNETClientAppBase HoloNETClient { get; set; } property This is a reference to the internal instance of the HoloNET Client (either the one passed in through a constructor or one created internally.)
bool IsChanged { get; set; } property This can be mnaually set to true to mark this entry as changed (will update 'State' property to 'Updated'). If this is still false when SaveAllChangesAsync/SaveAllChanges is called on HoloNETCollection or HoloNETObservableCollection then these methods will call internally the 'HasEntryChanged' method on this entry, which will then check each property for changes and set the 'IsChanged' flag to true and 'State' property to Updated if it finds any.
bool IsInitialized { get; } property This will return true once HoloNETEntryBase and it's internal HoloNET client have finished initializing and the OnInitialized event has been raised. See also the IsInitializing property and the Initialize method.
bool IsInitializing { get; } property This will return true whilst HoloNETEntryBaseClass and it's internal HoloNET client is initializing. The Initialize method will begin the initialization process. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. Once the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then raised the OnReadyForZomeCalls event it will raise the OnInitialized event. See also the IsInitialized property. |
Dictionary<string, object> OrginalDataKeyValuePairs { get; set; } property The original KeyValue pairs returned from the HoloNETClientAppAgent that the HoloNETEntry is constructed out of.
IHoloNETEntryBase OrginalEntry { get; set; } property The original HoloNETEntry returned from the HoloNETClientAppAgent after it is loaded or saved.
Dictionary<string, string> OrginalKeyValuePairs { get; } property The raw original KeyValue pairs returned from the Holochain Conductor/Zome Call.
string PreviousVersionActionHash { get; set; } property The previous ActionHash.
IRecord Record { get; set; } property Metadata for the Entry.
HoloNETEntryState State { get; set; } property This property is a shortcut to the State property on the WebSocket property above.
string ZomeCreateEntryFunction { get; set; } property The name of the zome function to call to create the entry.
string ZomeDeleteEntryFunction { get; set; } property The name of the zome function to call to delete the entry.
string ZomeLoadEntryFunction { get; set; } property The name of the zome function to call to load the entry.
string ZomeName { get; set; } property This is the name of the rust zome in your hApp that this instance of the HoloNETEntryBaseClass maps onto. You can set this either through this property or through one of the constructors.
string ZomeUpdateEntryFunction { get; set; } property The name of the zome function to call to update the entry.
HoloNETEntryBase.Closed OnClosed event Fired after the Close method has finished closing the connection to the Holochain Conductor and has shutdown all running Holochain Conductors (if configured to do so). This method calls the ShutdownHoloNET internally.
HoloNETEntryBase.Deleted OnDeleted event Fired after the Delete method has finished deleting the Holochain entry and has received a response from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor.
HoloNETEntryBase.Error OnError event Fired when there is an error either in HoloNETEntryBase or the HoloNET client itself.
HoloNETEntryBase.Initialized OnInitialized event Fired after the Initialize method has finished initializing the HoloNET client. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. This event is then fired when the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then fired the OnReadyForZomeCalls event. See also the IsInitializing and the IsInitialized properties.
HoloNETEntryBase.Loaded OnLoaded event Fired after the Load method has finished loading the Holochain entry from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object.
HoloNETEntryBase.Saved OnSaved event Fired after the Save method has finished saving the Holochain entry to the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeCreateEntryFunction or property ZomeCreateEntryFunction if it is a new entry (empty object) or the zomeUpdateEntryFunction param and ZomeUpdateEntryFunction property if it's an existing entry (previously saved object containing a valid value for the EntryHash property). Once it has saved the entry it will then update the EntryHash property with the entry hash returned from the zome call/conductor. The PreviousVersionEntryHash property is also set to the previous EntryHash (if there is one).
object BuildDynamicParamsObject(Dictionary<string, string> customDataKeyValuePairs = null, Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePairs = null, bool cachePropertyInfos = true) method This method will dynamically build up the params object for this entry ready to be passed into one of the Save/SaveAsync function overloads or into one of the CallZomeFunction overloads on the HoloNETClientAppAgent itself. NOTE: This will automatically extrct the properties that need saving (contain the HolochainFieldName attribute). This method uses reflection so has a tiny performance overhead (negligbale). NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
static void ClearCache() method Clears the PropertyInfo cache used during the Save methods that use reflection to dynamically build the params for the zome function (save/update).
HoloNETShutdownEventArgs Close(ShutdownHolochainConductorsMode shutdownHolochainConductorsMode = UseHoloNETDNASettings) method Will close this HoloNET Entry and then shutdown its internal HoloNET instance (if one was not passed in) and its current connetion to the Holochain Conductor and then shutdown all running Holochain Conductors (if configured to do so) as well as any other tasks to shut HoloNET down cleanly. This method calls the ShutdownHoloNET method internally. Once it has finished shutting down HoloNET it will raise the OnClosed event. You can specify if HoloNET should wait until it has finished disconnecting and shutting down the conductors before returning to the caller or whether it should return immediately and then use the OnDisconnected, OnHolochainConductorsShutdownComplete & OnHoloNETShutdownComplete events to notify the caller.
Task<HoloNETShutdownEventArgs> CloseAsync(DisconnectedCallBackMode disconnectedCallBackMode = WaitForHolochainConductorToDisconnect, ShutdownHolochainConductorsMode shutdownHolochainConductorsMode = UseHoloNETDNASettings) method Will close this HoloNET Entry and then shutdown its internal HoloNET instance (if one was not passed in) and its current connetion to the Holochain Conductor and then shutdown all running Holochain Conductors (if configured to do so) as well as any other tasks to shut HoloNET down cleanly. This method calls the ShutdownHoloNET method internally. Once it has finished shutting down HoloNET it will raise the OnClosed event. You can specify if HoloNET should wait until it has finished disconnecting and shutting down the conductors before returning to the caller or whether it should return immediately and then use the OnDisconnected, OnHolochainConductorsShutdownComplete & OnHoloNETShutdownComplete events to notify the caller.
ZomeFunctionCallBackEventArgs Delete(Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event. NOTE: This uses the EntryHash property to retrieve the entries hash to soft delete. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info... This is an optional param where a dictionary containing additional params (KeyValue Pairs) can be passed to the zome function. If this is passed in then the entryHash will automatically be added to the new params with key entry_hash (make sure your hApp zome function is expecting this name)This is an optional param, set this to true (default) to map the data returned from the Holochain Conductor onto the Entry Data Object that extends this base class (HoloNETEntryBase or HoloNETAuditEntryBaseClass). This will have a very small performance overhead but means you do not need to do the mapping yourself from the ZomeFunctionCallBackEventArgs.KeyValuePair.
ZomeFunctionCallBackEventArgs Delete(string entryHash, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
Task<ZomeFunctionCallBackEventArgs> DeleteAsync(Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event. NOTE: This uses the EntryHash property to retrieve the entries hash to soft delete. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
Task<ZomeFunctionCallBackEventArgs> DeleteAsync(string entryHash, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
ZomeFunctionCallBackEventArgs DeleteByCustomField(string customFieldToDeleteByValue, string customFieldToDeleteByKey = "", Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
Task<ZomeFunctionCallBackEventArgs> DeleteByCustomFieldAsync(string customFieldToDeleteByValue, string customFieldToDeleteByKey = "", Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
bool HasEntryChanged(Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePairs = null, bool cachePropertyInfos = true) method This method will use reflection to see if any of the properties have been changed since the last time this entry was saved or loaded. If it finds any changes it will set the IsChanged property to true. You can choose to manually track if any changes have been made by setting the IsChanged flag yourself. NOTE: This method will be called internally by either HoloNETCollection or HoloNETObservableCollection when the SaveAllChangesAsync/SaveAllChanges methods are called if the IsChanged flag has not been manually set on the entry.
void Initialize(bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) method This method will Initialize the HoloNETEntryBaseClass along with the internal HoloNET Client and will raise the OnInitialized event once it has finished initializing. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. Once the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then raised the OnReadyForZomeCalls event it will raise the OnInitialized event. See also the IsInitializing and the IsInitialized properties.
Task InitializeAsync(ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) method This method will Initialize the HoloNETEntryBaseClass along with the internal HoloNET Client and will raise the OnInitialized event once it has finished initializing. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. Once the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then raised the OnReadyForZomeCalls event it will raise the OnInitialized event. See also the IsInitializing and the IsInitialized properties.
ZomeFunctionCallBackEventArgs Load(Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry (it will use the EntryHash property to load from) from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
ZomeFunctionCallBackEventArgs Load(string entryHash, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
Task<ZomeFunctionCallBackEventArgs> LoadAsync(Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry (it will use the EntryHash property to load from) from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
Task<ZomeFunctionCallBackEventArgs> LoadAsync(string entryHash, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event. NOTE: The corresponding rust Holochain Entry in your hApp wil need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
ZomeFunctionCallBackEventArgs LoadByCustomField(string customFieldToLoadByValue, string customFieldToLoadByKey = "", Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
Task<ZomeFunctionCallBackEventArgs> LoadByCustomFieldAsync(string customFieldToLoadByValue, string customFieldToLoadByKey = "", Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
ZomeFunctionCallBackEventArgs Save(Dictionary<string, string> customDataKeyValuePairs = null, Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePairs = null, bool cachePropertyInfos = true, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will save the Holochain entry to the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeCreateEntryFunction or property ZomeCreateEntryFunction if it is a new entry (empty object) or the zomeUpdateEntryFunction param and ZomeUpdateEntryFunction property if it's an existing entry (previously saved object containing a valid value for the EntryHash property). Once it has saved the entry it will then update the EntryHash property with the entry hash returned from the zome call/conductor. The PreviousVersionEntryHash property is also set to the previous EntryHash (if there is one). Once it has finished saving and got a response from the Holochain Conductor it will raise the OnSaved event. NOTE: This will automatically extrct the properties that need saving (contain the HolochainFieldName attribute). This method uses reflection so has a tiny performance overhead (negligbale), but if you need the extra nanoseconds use the other Save overload passing in your own params object. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
ZomeFunctionCallBackEventArgs Save(object paramsObject, bool autoGeneratUpdatedEntryObjectAndOriginalEntryHashRustParams = true, string updatedEntryRustParamName = "updated_entry", string originalEntryHashRustParamName = "original_action_hash", bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will save the Holochain entry to the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeCreateEntryFunction or property ZomeCreateEntryFunction if it is a new entry (empty object) or the zomeUpdateEntryFunction param and ZomeUpdateEntryFunction property if it's an existing entry (previously saved object containing a valid value for the EntryHash property). Once it has saved the entry it will then update the EntryHash property with the entry hash returned from the zome call/conductor. The PreviousVersionEntryHash property is also set to the previous EntryHash (if there is one). Once it has finished saving and got a response from the Holochain Conductor it will raise the OnSaved event. NOTE: This will automatically extrct the properties that need saving (contain the HolochainFieldName attribute). This method uses reflection so has a tiny performance overhead (negligbale), but if you need the extra nanoseconds use the other Save overload passing in your own params object. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
Task<ZomeFunctionCallBackEventArgs> SaveAsync(Dictionary<string, string> customDataKeyValuePairs = null, Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePairs = null, bool cachePropertyInfos = true, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will save the Holochain entry to the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeCreateEntryFunction or property ZomeCreateEntryFunction if it is a new entry (empty object) or the zomeUpdateEntryFunction param and ZomeUpdateEntryFunction property if it's an existing entry (previously saved object containing a valid value for the EntryHash property). Once it has saved the entry it will then update the EntryHash property with the entry hash returned from the zome call/conductor. The PreviousVersionEntryHash property is also set to the previous EntryHash (if there is one). Once it has finished saving and got a response from the Holochain Conductor it will raise the OnSaved event. NOTE: This will automatically extrct the properties that need saving (contain the HolochainFieldName attribute). This method uses reflection so has a tiny performance overhead (negligbale), but if you need the extra nanoseconds use the other Save overload passing in your own params object. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
Task<ZomeFunctionCallBackEventArgs> SaveAsync(object paramsObject, bool autoGeneratUpdatedEntryObjectAndOriginalEntryHashRustParams = true, string updatedEntryRustParamName = "updated_entry", string originalEntryHashRustParamName = "original_action_hash", bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will save the Holochain entry to the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeCreateEntryFunction or property ZomeCreateEntryFunction if it is a new entry (empty object) or the zomeUpdateEntryFunction param and ZomeUpdateEntryFunction property if it's an existing entry (previously saved object containing a valid value for the EntryHash property). Once it has saved the entry it will then update the EntryHash property with the entry hash returned from the zome call/conductor. The PreviousVersionEntryHash property is also set to the previous EntryHash (if there is one). Once it has finished saving and got a response from the Holochain Conductor it will raise the OnSaved event. NOTE: This will automatically extrct the properties that need saving (contain the HolochainFieldName attribute). This method uses reflection so has a tiny performance overhead (negligbale), but if you need the extra nanoseconds use the other Save overload passing in your own params object. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
Task<ReadyForZomeCallsEventArgs> WaitTillHoloNETInitializedAsync() method This mehod will call the WaitTillReadyForZomeCallsAsync method on the HoloNET Client.

HoloNETEntryBase.Initialized (delegate)

Inherits / implements: MulticastDelegate, ICloneable, ISerializable

Handler signature: void Initialized(object sender, ReadyForZomeCallsEventArgs e) (the type of the OnInitialized event).

HoloNETEntryBase.Loaded (delegate)

Inherits / implements: MulticastDelegate, ICloneable, ISerializable

Handler signature: void Loaded(object sender, ZomeFunctionCallBackEventArgs e) (the type of the OnLoaded event).

HoloNETEntryBase.Saved (delegate)

Inherits / implements: MulticastDelegate, ICloneable, ISerializable

Handler signature: void Saved(object sender, ZomeFunctionCallBackEventArgs e) (the type of the OnSaved event).

NextGenSoftware.Holochain.HoloNET.ORM.Enums

HoloNETEntryState (enum)

Value Description
NoChanges
AddedToCollection
RemovedFromCollection
Updated
UpdatedAndAddedToCollection
UpdatedAndRemovedFromCollections

NextGenSoftware.Holochain.HoloNET.ORM.Generation

HappEntrySpec (class)

One entry type (a STAR holon): its name and fields.

Member Kind Description
HappEntrySpec(string name, HappFieldSpec[] fields) ctor An entry with these fields.
List<HappFieldSpec> Fields { get; set; } property The entry's fields.
string Name { get; set; } property The entry name (PascalCase), e.g. "Player".

HappFieldSpec (class)

One field of an entry: its C# property name and type.

Member Kind Description
HappFieldSpec(string name, string csharpType) ctor A field with this C# name and type.
string CSharpType { get; set; } property string, int, long, bool, double, float, Guid or DateTime (Guid and DateTime are stored as strings).
string Name { get; set; } property The C# property name (PascalCase); the Rust field is its snake_case.

HappHolochainVersion (enum)

The Holochain version a generated hApp targets (picks the hdk / hdi crate versions).

Value Description
V0_7_1 Holochain 0.7.1: hdk 0.7.1, hdi 0.8.1.
V0_7_0 Holochain 0.7.0: hdk 0.7.0, hdi 0.8.0.

HappSpec (class)

What to generate: the hApp (one DNA, one role), its zomes, and the C# namespace for the models.

Member Kind Description
string CSharpNamespace { get; set; } property The namespace of the generated C# models.
HappHolochainVersion HolochainVersion { get; set; } property The Holochain version to target (picks the hdk / hdi crates).
string Name { get; set; } property The hApp's name (also its DNA and role name, in snake_case).
List<HappZomeSpec> Zomes { get; set; } property The zomes to generate.

HappZomeSpec (class)

One zome (a STAR zome): an integrity zome and a coordinator zome with the entries' CRUD and collections.

Member Kind Description
HappZomeSpec(string name, HappEntrySpec[] entries) ctor A zome with these entries.
List<HappEntrySpec> Entries { get; set; } property The zome's entries.
string Name { get; set; } property The zome's name.

HolochainHappGenerator (static class)

Generates a complete, buildable Holochain 0.7 hApp from a HappSpec: a Cargo workspace with an integrity zome (entry and link types, validation) and a coordinator zome per zome (create / get / update / delete for every entry, plus anchored collections), the dna.yaml and happ.yaml, a build script, and the matching C# HoloNET ORM models (a HoloNETEntryBase class per entry and a collection factory). The zome function shapes are the ones HoloNET ORM uses, so the generated models work against the generated hApp with no changes. Used by WEB5 STAR (via HoloOASIS) to generate hApps from metadata.

Member Kind Description
static HappSpec FromStarDnaFolder(string celestialBodyDnaFolder, string happName, string csharpNamespace = null) method Read a spec from STAR CelestialBody DNA source files: classes deriving from ZomeDNA, each with nested classes deriving from HolonDNA whose public properties become the entry's fields.
static List<string> Generate(HappSpec spec, string outputFolder) method Write the hApp into (Rust under it, C# models under its CSharp folder). Returns the files written.
static string Pascal(string name) method snake_case or any name to PascalCase ("player_name" -> "PlayerName").
static string Snake(string name) method PascalCase or camelCase to snake_case ("PlayerName" -> "player_name").

NextGenSoftware.Holochain.HoloNET.ORM.Interfaces

IHoloNETAuditEntryBase (interface)

Inherits / implements: IHoloNETEntryBase

Member Kind Description
List<IHoloNETAuditEntry> AuditEntries { get; set; } property This contains a collection of audit enties that allow you to track every action that was taken on the Holochain Entry that this instance of the HoloNETAuditEntryBaseClass maps onto. Each audit entry contains the EntryHash, DateTime & the Type (Create, Modify or Delete). |
string CreatedBy { get; set; } property The AgentID of the agent/user that created it.
DateTime CreatedDate { get; set; } property The date that the entry was created.
string DeletedBy { get; set; } property The AgentID of the agent/user that deleted it.
DateTime DeletedDate { get; set; } property The date that the entry was deleted.
Guid Id { get; set; } property This is a unique ID (GUID) given to the entry which is consistent across multiple versions.
bool IsActive { get; set; } property A boolean flag that determines whether the entry is currently active or not.
bool IsActiveFlagEnabled { get; set; } property Set this to true if you wish to enable the IsActive flag (you will need to make sure your hApp rust code has the is_active flag added to your entry struct).
bool IsAuditAgentCreateModifyDeleteFieldsEnabled { get; set; } property Set this to true if you wish to update the CreatedDate, CreatedBy, ModifiedDate, ModifiedBy, DeletedData & DeletedBy properties each time the entry/object is saved or deleted (you will need to make sure your hApp rust code has the created_date, created_by, modified_date, modified_by, deleted_date & deleted_by fields in your entry struct).
bool IsAuditTrackingEnabled { get; set; } property Set this to true if you wish to enable Audit Tracking (the AuditEntries property will be updated every time the entry/object is saved or deleted).
bool IsGenerateUniqueGuidIdEnabled { get; set; } property Set this to true if you wish to automatically generate a unique guid id which persists across multiple versions of this HoloNETEntry (the EntryHash will change for each version after you save). You will need to make sure your hApp rust code has the id field in your entry struct.
bool IsVersionTrackingEnabled { get; set; } property Set this to true if you wish to enable Version Tracking (you will need to make sure your hApp rust code has the version field added to your entry struct).
string ModifiedBy { get; set; } property The AgentID of the agent/user that last modified it.
DateTime ModifiedDate { get; set; } property The date that the entry was last modified.
int Version { get; set; } property This is the current version of the HolochainEntry. Each time it is saved with the Save method it will be incremented. NOTE: You will need to ensure you add a corresponding property in the rust entry struct for your hApp (pub version: i32), which will then map to this property.
ZomeFunctionCallBackEventArgs Delete(Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event. NOTE: The parmeterless overload will automatically extrct the properties that need saving (contain the HolochainFieldName attribute). This method uses reflection so has a tiny performance overhead (negligbale), but if you need the extra nanoseconds use the other Save overload passing in your own params object.
ZomeFunctionCallBackEventArgs Delete(string entryHash, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event. NOTE: The parmeterless overload will automatically extrct the properties that need saving (contain the HolochainFieldName attribute). This method uses reflection so has a tiny performance overhead (negligbale), but if you need the extra nanoseconds use the other Save overload passing in your own params object.
Task<ZomeFunctionCallBackEventArgs> DeleteAsync(Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event. NOTE: The parmeterless overload will automatically extrct the properties that need saving (contain the HolochainFieldName attribute). This method uses reflection so has a tiny performance overhead (negligbale), but if you need the extra nanoseconds use the other Save overload passing in your own params object.
Task<ZomeFunctionCallBackEventArgs> DeleteAsync(string entryHash, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event. NOTE: The parmeterless overload will automatically extrct the properties that need saving (contain the HolochainFieldName attribute). This method uses reflection so has a tiny performance overhead (negligbale), but if you need the extra nanoseconds use the other Save overload passing in your own params object.
ZomeFunctionCallBackEventArgs DeleteByCustomField(string customFieldToDeleteByValue, string customFieldToDeleteByKey = "", Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBaseClass in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
Task<ZomeFunctionCallBackEventArgs> DeleteByCustomFieldAsync(string customFieldToDeleteByValue, string customFieldToDeleteByKey = "", Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBaseClass in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
ZomeFunctionCallBackEventArgs Load(int version = 0, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry from the Holochain Conductor using either the EntryHash property or entryHash param passed into one of the overloads for this method. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event.
ZomeFunctionCallBackEventArgs Load(string entryHash, int version = 0, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry from the Holochain Conductor using either the EntryHash property or entryHash param passed into one of the overloads for this method. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event.
Task<ZomeFunctionCallBackEventArgs> LoadAsync(int version = 0, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry from the Holochain Conductor using either the EntryHash property or entryHash param passed into one of the overloads for this method. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event.
Task<ZomeFunctionCallBackEventArgs> LoadAsync(string entryHash, int version = 0, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry from the Holochain Conductor using either the EntryHash property or entryHash param passed into one of the overloads for this method. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event.
ZomeFunctionCallBackEventArgs LoadByCustomField(string customFieldToLoadByValue, string customFieldToLoadByKey = "", int version = 0, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBaseClass in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
Task<ZomeFunctionCallBackEventArgs> LoadByCustomFieldAsync(string customFieldToLoadByValue, string customFieldToLoadByKey = "", int version = 0, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBaseClass in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
ZomeFunctionCallBackEventArgs Save(Dictionary<string, string> customDataKeyValuePair = null, Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePair = null, bool cachePropertyInfos = true, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will save the Holochain entry to the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeCreateEntryFunction or property ZomeCreateEntryFunction if it is a new entry (empty object) or the zomeUpdateEntryFunction param and ZomeUpdateEntryFunction property if it's an existing entry (previously saved object containing a valid value for the EntryHash property). Once it has saved the entry it will then update the EntryHash property with the entry hash returned from the zome call/conductor. The PreviousVersionEntryHash property is also set to the previous EntryHash (if there is one). Once it has finished saving and got a response from the Holochain Conductor it will raise the OnSaved event.
ZomeFunctionCallBackEventArgs Save(object paramsObject, bool autoGeneratUpdatedEntryObjectAndOriginalEntryHashRustParams = true, string updatedEntryRustParamName = "updated_entry", string originalEntryHashRustParamName = "original_action_hash", bool addAuditInfoToParams = true, bool addVersionToParams = true, bool addUniqueGuidIdToParams = true, bool addIsActiveFlagToParams = true, string createdDateRustParamName = "created_date", string createdByRustParamName = "created_by", string modifiedDateRustParamName = "modified_date", string modifiedByRustParamName = "modified_by", string deletedDateRustParamName = "deleted_date", string deletedByRustParamName = "deleted_by", string versionRustParamName = "version", string idRustParamName = "id", string isActiveRustParamName = "is_active", bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will save the Holochain entry to the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeCreateEntryFunction or property ZomeCreateEntryFunction if it is a new entry (empty object) or the zomeUpdateEntryFunction param and ZomeUpdateEntryFunction property if it's an existing entry (previously saved object containing a valid value for the EntryHash property). Once it has saved the entry it will then update the EntryHash property with the entry hash returned from the zome call/conductor. The PreviousVersionEntryHash property is also set to the previous EntryHash (if there is one). Once it has finished saving and got a response from the Holochain Conductor it will raise the OnSaved event.
Task<ZomeFunctionCallBackEventArgs> SaveAsync(Dictionary<string, string> customDataKeyValuePair = null, Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePair = null, bool cachePropertyInfos = true, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will save the Holochain entry to the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeCreateEntryFunction or property ZomeCreateEntryFunction if it is a new entry (empty object) or the zomeUpdateEntryFunction param and ZomeUpdateEntryFunction property if it's an existing entry (previously saved object containing a valid value for the EntryHash property). Once it has saved the entry it will then update the EntryHash property with the entry hash returned from the zome call/conductor. The PreviousVersionEntryHash property is also set to the previous EntryHash (if there is one). Once it has finished saving and got a response from the Holochain Conductor it will raise the OnSaved event.
Task<ZomeFunctionCallBackEventArgs> SaveAsync(object paramsObject, bool autoGeneratUpdatedEntryObjectAndOriginalEntryHashRustParams = true, string updatedEntryRustParamName = "updated_entry", string originalEntryHashRustParamName = "original_action_hash", bool addAuditInfoToParams = true, bool addVersionToParams = true, bool addUniqueGuidIdToParams = true, bool addIsActiveFlagToParams = true, string createdDateRustParamName = "created_date", string createdByRustParamName = "created_by", string modifiedDateRustParamName = "modified_date", string modifiedByRustParamName = "modified_by", string deletedDateRustParamName = "deleted_date", string deletedByRustParamName = "deleted_by", string versionRustParamName = "version", string idRustParamName = "id", string isActiveRustParamName = "is_active", bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will save the Holochain entry to the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeCreateEntryFunction or property ZomeCreateEntryFunction if it is a new entry (empty object) or the zomeUpdateEntryFunction param and ZomeUpdateEntryFunction property if it's an existing entry (previously saved object containing a valid value for the EntryHash property). Once it has saved the entry it will then update the EntryHash property with the entry hash returned from the zome call/conductor. The PreviousVersionEntryHash property is also set to the previous EntryHash (if there is one). Once it has finished saving and got a response from the Holochain Conductor it will raise the OnSaved event.

IHoloNETCollection<T> (interface)

Member Kind Description
List<T> EntriesAddedSinceLastSaved { get; } property The entries that have been added since the last time the Save/SaveAsync method has been called. When Save/SaveAsync is next called this list will be emptied once the save is successfull.
List<T> EntriesRemovedSinceLastSaved { get; } property The entries that have been removed since the last time the Save/SaveAsync method has been called. When Save/SaveAsync is next called this list will be emptied once the save is successfull.
IHoloNETClientAppBase HoloNETClient { get; set; } property This is a reference to the internal instance of the HoloNET Client (either the one passed in through a constructor or one created internally.)
bool IsChanges { get; } property This will be true if any chnages have been made to this collection (entries added, removed or updated) since the last time the Save/SaveAsync functions were called. After they have been called it will be reset to false.
bool IsInitialized { get; } property This will return true once HoloNETEntryBaseClass and it's internal HoloNET client have finished initializing and the OnInitialized event has been raised. See also the IsInitializing property and the Initialize method.
bool IsInitializing { get; } property This will return true whilst HoloNETEntryBaseClass and it's internal HoloNET client is initializing. The Initialize method will begin the initialization process. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. Once the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then raised the OnReadyForZomeCalls event it will raise the OnInitialized event. See also the IsInitialized property. |
List<T> OriginalEntries { get; } property This contains the original entries since the last time this collection was loaded or saved.
string ZomeAddEntryToCollectionFunction { get; set; } property The name of the zome function to call to add a HoloNETEntry to a collection.
string ZomeBatchUpdateCollectionFunction { get; set; } property The name of the zome function to call to batch update all changes made to the collection (entries added, removed and updated (optional)),
string ZomeLoadCollectionFunction { get; set; } property The name of the zome function to call to load a collection of entries.
string ZomeName { get; set; } property This is the name of the rust zome in your hApp that this instance of the HoloNETEntryBaseClass maps onto. You can set this either through this property or through one of the constructors.
string ZomeRemoveEntryFromCollectionFunction { get; set; } property The name of the zome function to call to remove a HoloNETEntry from a collection.
Closed<T> OnClosed event Fired after the Close method has finished closing the connection to the Holochain Conductor and has shutdown all running Holochain Conductors (if configured to do so). This method calls the ShutdownHoloNET internally.
CollectionLoaded<T> OnCollectionLoaded event Fired after the LoadCollection method has finished loading the Holochain Collection from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadCollectionFunction or property ZomeLoadCollectionFunction and then maps the data returned from the zome call onto your collection.
CollectionSaved<T> OnCollectionSaved event Fired after the Save/SaveAsync method has finished saving all HoloNET Entries that were either added, removed or updated. This may optionally update the collection in one batch operation. See Save/SaveAsync for more info.
Error<T> OnError event Fired when there is an error either in HoloNETEntryBaseClass or the HoloNET client itself.
HoloNETEntryAddedToCollection<T> OnHoloNETEntryAddedToCollection event Fired after an HoloNET Entry has been added to the collection. This can be from either calling the AddHoloNETEntryToCollection function or from the SaveCollection function which will automatically add any new entries to the collection. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeAddEntryToCollectionFunction or property ZomeAddEntryToCollectionFunction.
HoloNETEntryRemovedFromCollection<T> OnHoloNETEntryRemovedFromCollection event Fired after an HoloNET Entry has been removed from the collection. This can be from either calling the RemoveHoloNETEntryFromCollection function or from the SaveCollection function which will automatically remove any old entries from the collection (ones that have been removed in c# client side code but not yet synced with the rust backend code). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeRemoveEntryToCollectionFunction or property ZomeRemoveEntryToCollectionFunction.
Initialized<T> OnInitialized event Fired after the Initialize method has finished initializing the HoloNET client. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. This event is then fired when the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then fired the OnReadyForZomeCalls event. See also the IsInitializing and the IsInitialized properties.
ZomeFunctionCallBackEventArgs AddHoloNETEntryToCollectionAndSave(T holoNETEntry, bool saveHoloNETEntry = true, string collectionAnchor = "") method This method will add the HoloNETEntry to the collection. If 'saveHoloNETEntry' is set to true (default) it will call the SaveAsync method on the HoloNETEntry before adding it to the collection. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param 'zomeAddEntryToCollectionFunction' or property 'ZomeAddEntryToCollectionFunction'. It will then raise the OnHoloNETEntryAddedToCollection event.
Task<ZomeFunctionCallBackEventArgs> AddHoloNETEntryToCollectionAndSaveAsync(T holoNETEntry, bool saveHoloNETEntry = true, string collectionAnchor = "", bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will add the HoloNETEntry to the collection. If 'saveHoloNETEntry' is set to true (default) it will call the SaveAsync method on the HoloNETEntry before adding it to the collection. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param 'zomeAddEntryToCollectionFunction' or property 'ZomeAddEntryToCollectionFunction'. It will then raise the OnHoloNETEntryAddedToCollection event.
HoloNETShutdownEventArgs Close(ShutdownHolochainConductorsMode shutdownHolochainConductorsMode = UseHoloNETDNASettings) method Will close this HoloNET Entry and then shutdown its internal HoloNET instance (if one was not passed in) and its current connetion to the Holochain Conductor and then shutdown all running Holochain Conductors (if configured to do so) as well as any other tasks to shut HoloNET down cleanly. This method calls the ShutdownHoloNET method internally. Once it has finished shutting down HoloNET it will raise the OnClosed event. You can specify if HoloNET should wait until it has finished disconnecting and shutting down the conductors before returning to the caller or whether it should return immediately and then use the OnDisconnected, OnHolochainConductorsShutdownComplete & OnHoloNETShutdownComplete events to notify the caller.
Task<HoloNETShutdownEventArgs> CloseAsync(DisconnectedCallBackMode disconnectedCallBackMode = WaitForHolochainConductorToDisconnect, ShutdownHolochainConductorsMode shutdownHolochainConductorsMode = UseHoloNETDNASettings) method Will close this HoloNET Entry and then shutdown its internal HoloNET instance (if one was not passed in) and its current connetion to the Holochain Conductor and then shutdown all running Holochain Conductors (if configured to do so) as well as any other tasks to shut HoloNET down cleanly. This method calls the ShutdownHoloNET method internally. Once it has finished shutting down HoloNET it will raise the OnClosed event. You can specify if HoloNET should wait until it has finished disconnecting and shutting down the conductors before returning to the caller or whether it should return immediately and then use the OnDisconnected, OnHolochainConductorsShutdownComplete & OnHoloNETShutdownComplete events to notify the caller.
void Initialize(bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) method This method will Initialize the HoloNETEntryBaseClass along with the internal HoloNET Client and will raise the OnInitialized event once it has finished initializing. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. Once the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then raised the OnReadyForZomeCalls event it will raise the OnInitialized event. See also the IsInitializing and the IsInitialized properties.
Task InitializeAsync(ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) method This method will Initialize the HoloNETEntryBaseClass along with the internal HoloNET Client and will raise the OnInitialized event once it has finished initializing. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. Once the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then raised the OnReadyForZomeCalls event it will raise the OnInitialized event. See also the IsInitializing and the IsInitialized properties.
HoloNETCollectionLoadedResult<T> LoadCollection(string collectionAnchor = "", Dictionary<string, string> customDataKeyValuePairs = null) method This method will load the entries for this collection from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadCollectionFunction or property ZomeLoadCollectionFunction and then maps the data returned from the zome call onto your collection of data objects. It will then raise the OnCollectionLoaded event.
Task<HoloNETCollectionLoadedResult<T>> LoadCollectionAsync(string collectionAnchor = "", Dictionary<string, string> customDataKeyValuePairs = null) method This method will load the entries for this collection from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadCollectionFunction or property ZomeLoadCollectionFunction and then maps the data returned from the zome call onto your collection of data objects. It will then raise the OnCollectionLoaded event.
void ReCalculateEntriesAddedOrRemovedSinceLastSaved() method Recompute EntriesAddedSinceLastSaved / EntriesRemovedSinceLastSaved from the current list.
ZomeFunctionCallBackEventArgs RemoveHoloNETEntryFromCollectionAndSave(T holoNETEntry, string collectionAnchor = "") method This method will remnove the HoloNETEntry from the collection. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param 'zomeRemoveEntryFromCollectionFunction' or property 'ZomeRemoveEntryFromCollectionFunction'. It will then raise the OnHoloNETEntryRemovedFromCollection event.
Task<ZomeFunctionCallBackEventArgs> RemoveHoloNETEntryFromCollectionAndSaveAsync(T holoNETEntry, string collectionAnchor = "") method This method will remnove the HoloNETEntry from the collection. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param 'zomeRemoveEntryFromCollectionFunction' or property 'ZomeRemoveEntryFromCollectionFunction'. It will then raise the OnHoloNETEntryRemovedFromCollection event.
HoloNETCollectionSavedResult SaveAllChanges(bool saveChangesMadeToEntries = true, bool saveAsOneBatchOperation = true, bool saveHoloNETEntryWhenAddingToCollection = true, bool continueOnError = true, string collectionAnchor = "", Dictionary<string, string> customDataKeyValuePairs = null, Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePairs = null, bool cachePropertyInfos = true) method This method will save all changes made to the collection since the last time this method was called and persist the changes to the Holochain Conductor. This includes any entries that were added or removed to the collection via the Add and Remove methods (in-memory only). It also persists any entries that were updated if the 'saveChangesMadeToEntries' param is set to true (defaults to true). If entries were added or removed via the AddHoloNETEntryToCollectionAndSave and RemoveHoloNETEntryFromCollectionAndSave methods then these entries will NOT be added/removed again. If the 'saveAsOneBatchOperation' param is set to true (default), any new entries added, old entries removed or entries changed will be updated as one batch operation. This will be faster than making many seperate calls for adding, remove or updating entries. For this to work you need to make sure the 'ZomeBatchUpdateCollectionFunction' is set or was passed in via one of the constructors, it will then batch update any entries that have changed (added, removed or changed) since the last time this method was called. If 'saveAsOneBatchOperation' is set to false then it will call the SaveAsync method for updating each entry (if 'saveChangesMadeToEntries' is set to true), 'AddHoloNETEntryToCollectionAndSaveAsync' for adding new entries and 'RemoveHoloNETEntryFromCollectionAndSaveAsync' for removing old entries. This of course will be slower than updating them as a batch depending on the size of the collection. This will invoke the 'OnCollectionSaved' event once it has finished saving any changes to the collection.
Task<HoloNETCollectionSavedResult> SaveAllChangesAsync(bool saveChangesMadeToEntries = true, bool saveAsOneBatchOperation = true, bool saveHoloNETEntryWhenAddingToCollection = true, bool continueOnError = true, string collectionAnchor = "", Dictionary<string, string> customDataKeyValuePairs = null, Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePairs = null, bool cachePropertyInfos = true) method This method will save all changes made to the collection since the last time this method was called and persist the changes to the Holochain Conductor. This includes any entries that were added or removed to the collection via the Add and Remove methods (in-memory only). It also persists any entries that were updated if the 'saveChangesMadeToEntries' param is set to true (defaults to true). If entries were added or removed via the AddHoloNETEntryToCollectionAndSave and RemoveHoloNETEntryFromCollectionAndSave methods then these entries will NOT be added/removed again. If the 'saveAsOneBatchOperation' param is set to true (default), any new entries added, old entries removed or entries changed will be updated as one batch operation. This will be faster than making many seperate calls for adding, remove or updating entries. For this to work you need to make sure the 'ZomeBatchUpdateCollectionFunction' is set or was passed in via one of the constructors, it will then batch update any entries that have changed (added, removed or changed) since the last time this method was called. If 'saveAsOneBatchOperation' is set to false then it will call the SaveAsync method for updating each entry (if 'saveChangesMadeToEntries' is set to true), 'AddHoloNETEntryToCollectionAndSaveAsync' for adding new entries and 'RemoveHoloNETEntryFromCollectionAndSaveAsync' for removing old entries. This of course will be slower than updating them as a batch depending on the size of the collection. This will invoke the 'OnCollectionSaved' event once it has finished saving any changes to the collection.
void UpdateEnriesState(Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePairs = null, bool cachePropertyInfos = true) method Updates the collection's entries state (added, removed or updated).
Task<ReadyForZomeCallsEventArgs> WaitTillHoloNETInitializedAsync() method This mehod will call the WaitTillReadyForZomeCallsAsync method on the HoloNET Client.

IHoloNETEntryBase (interface)

Member Kind Description
string ActionHash { get; set; } property The ActionHash.
string EntryHash { get; set; } property This is the hash generated by the Holochain Conductor for the Holochain Entry that the HoloNETEntryBaseClass maps onto. This will be empty until after the first call to the Save method.
IHoloNETClientAppBase HoloNETClient { get; set; } property This is a reference to the internal instance of the HoloNET Client (either the one passed in through a constructor or one created internally.)
bool IsChanged { get; set; } property This can be mnaually set to true to mark this entry as changed (will update 'State' property to 'Updated'). If this is still false when SaveAllChangesAsync/SaveAllChanges is called on HoloNETCollection or HoloNETObservableCollection then these methods will call internally the 'HasEntryChanged' method on this entry, which will then check each property for changes and set the 'IsChanged' flag to true and 'State' property to Updated if it finds any.
bool IsInitialized { get; } property This will return true once HoloNETEntryBaseClass and it's internal HoloNET client have finished initializing and the OnInitialized event has been raised. See also the IsInitializing property and the Initialize method.
bool IsInitializing { get; } property This will return true whilst HoloNETEntryBaseClass and it's internal HoloNET client is initializing. The Initialize method will begin the initialization process. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. Once the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then raised the OnReadyForZomeCalls event it will raise the OnInitialized event. See also the IsInitialized property. |
Dictionary<string, object> OrginalDataKeyValuePairs { get; } property The original KeyValue pairs returned from the HoloNETClientAppAgent that the HoloNETEntry is constructed out of.
IHoloNETEntryBase OrginalEntry { get; } property The original HoloNETEntry returned from the HoloNETClientAppAgent after it is loaded or saved.
Dictionary<string, string> OrginalKeyValuePairs { get; } property The raw original KeyValue pairs returned from the Holochain Conductor/Zome Call.
string PreviousVersionActionHash { get; set; } property The previous ActionHash.
IRecord Record { get; set; } property Metadata for the Entry.
HoloNETEntryState State { get; set; } property This property is a shortcut to the State property on the WebSocket property above.
string ZomeCreateEntryFunction { get; set; } property This is the name of the rust zome function in your hApp that will be used to create new Holochain enties that this instance of the HoloNETEntryBaseClass maps onto. You can set this either through this property or through one of the constructors.
string ZomeDeleteEntryFunction { get; set; } property This is the name of the rust zome function in your hApp that will be used to delete existing Holochain enties that this instance of the HoloNETEntryBaseClass maps onto. You can set this either through this property or through one of the constructors.
string ZomeLoadEntryFunction { get; set; } property This is the name of the rust zome function in your hApp that will be used to load existing Holochain enties that this instance of the HoloNETEntryBaseClass maps onto. You can set this either through this property or through one of the constructors.
string ZomeName { get; set; } property This is the name of the rust zome in your hApp that this instance of the HoloNETEntryBaseClass maps onto. You can set this either through this property or through one of the constructors.
string ZomeUpdateEntryFunction { get; set; } property This is the name of the rust zome function in your hApp that will be used to update existing Holochain enties that this instance of the HoloNETEntryBaseClass maps onto. You can set this either through this property or through one of the constructors.
HoloNETEntryBase.Closed OnClosed event Fired after the Close method has finished closing the connection to the Holochain Conductor and has shutdown all running Holochain Conductors (if configured to do so). This method calls the ShutdownHoloNET internally.
HoloNETEntryBase.Deleted OnDeleted event Fired after the Delete method has finished deleting the Holochain entry and has received a response from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor.
HoloNETEntryBase.Error OnError event Fired when there is an error either in HoloNETEntryBaseClass or the HoloNET client itself.
HoloNETEntryBase.Initialized OnInitialized event Fired after the Initialize method has finished initializing the HoloNET client. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. This event is then fired when the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then fired the OnReadyForZomeCalls event. See also the IsInitializing and the IsInitialized properties.
HoloNETEntryBase.Loaded OnLoaded event Fired after the Load method has finished loading the Holochain entry from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object.
HoloNETEntryBase.Saved OnSaved event Fired after the Save method has finished saving the Holochain entry to the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeCreateEntryFunction or property ZomeCreateEntryFunction if it is a new entry (empty object) or the zomeUpdateEntryFunction param and ZomeUpdateEntryFunction property if it's an existing entry (previously saved object containing a valid value for the EntryHash property). Once it has saved the entry it will then update the EntryHash property with the entry hash returned from the zome call/conductor. The PreviousVersionEntryHash property is also set to the previous EntryHash (if there is one).
object BuildDynamicParamsObject(Dictionary<string, string> customDataKeyValuePairs = null, Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePairs = null, bool cachePropertyInfos = true) method This method will dynamically build up the params object for this entry ready to be passed into one of the Save/SaveAsync function overloads or into one of the CallZomeFunction overloads on the HoloNETClientAppAgent itself. NOTE: This will automatically extrct the properties that need saving (contain the HolochainFieldName attribute). This method uses reflection so has a tiny performance overhead (negligbale). NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
HoloNETShutdownEventArgs Close(ShutdownHolochainConductorsMode shutdownHolochainConductorsMode = UseHoloNETDNASettings) method Will close this HoloNET Entry and then shutdown its internal HoloNET instance (if one was not passed in) and its current connetion to the Holochain Conductor and then shutdown all running Holochain Conductors (if configured to do so) as well as any other tasks to shut HoloNET down cleanly. This method calls the ShutdownHoloNET method internally. Once it has finished shutting down HoloNET it will raise the OnClosed event. You can specify if HoloNET should wait until it has finished disconnecting and shutting down the conductors before returning to the caller or whether it should return immediately and then use the OnDisconnected, OnHolochainConductorsShutdownComplete & OnHoloNETShutdownComplete events to notify the caller.
Task<HoloNETShutdownEventArgs> CloseAsync(DisconnectedCallBackMode disconnectedCallBackMode = WaitForHolochainConductorToDisconnect, ShutdownHolochainConductorsMode shutdownHolochainConductorsMode = UseHoloNETDNASettings) method Will close this HoloNET Entry and then shutdown its internal HoloNET instance (if one was not passed in) and its current connetion to the Holochain Conductor and then shutdown all running Holochain Conductors (if configured to do so) as well as any other tasks to shut HoloNET down cleanly. This method calls the ShutdownHoloNET method internally. Once it has finished shutting down HoloNET it will raise the OnClosed event. You can specify if HoloNET should wait until it has finished disconnecting and shutting down the conductors before returning to the caller or whether it should return immediately and then use the OnDisconnected, OnHolochainConductorsShutdownComplete & OnHoloNETShutdownComplete events to notify the caller.
ZomeFunctionCallBackEventArgs Delete(Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event.
ZomeFunctionCallBackEventArgs Delete(string entryHash, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event.
Task<ZomeFunctionCallBackEventArgs> DeleteAsync(Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event.
Task<ZomeFunctionCallBackEventArgs> DeleteAsync(string entryHash, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event.
ZomeFunctionCallBackEventArgs DeleteByCustomField(string customFieldToDeleteByValue, string customFieldToDeleteByKey = "", Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
Task<ZomeFunctionCallBackEventArgs> DeleteByCustomFieldAsync(string customFieldToDeleteByValue, string customFieldToDeleteByKey = "", Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will soft delete the Holochain entry (the previous version can still be retrieved). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeDeleteEntryFunction or property ZomeDeleteEntryFunction. It then updates the HoloNET Entry Data Object with the response received from the Holochain Conductor and then finally raises the OnDeleted event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
bool HasEntryChanged(Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePairs = null, bool cachePropertyInfos = true) method This method will use reflection to see if any of the properties have been changed since the last time this entry was saved or loaded. If it finds any changes it will set the IsChanged property to true. You can choose to manually track if any changes have been made by setting the IsChanged flag yourself. NOTE: This method will be called internally by either HoloNETCollection or HoloNETObservableCollection when the SaveAllChangesAsync/SaveAllChanges methods are called if the IsChanged flag has not been manually set on the entry.
void Initialize(bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) method This method will Initialize the HoloNETEntryBaseClass along with the internal HoloNET Client and will raise the OnInitialized event once it has finished initializing. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. Once the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then raised the OnReadyForZomeCalls event it will raise the OnInitialized event. See also the IsInitializing and the IsInitialized properties.
Task InitializeAsync(ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) method This method will Initialize the HoloNETEntryBaseClass along with the internal HoloNET Client and will raise the OnInitialized event once it has finished initializing. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. Once the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then raised the OnReadyForZomeCalls event it will raise the OnInitialized event. See also the IsInitializing and the IsInitialized properties.
ZomeFunctionCallBackEventArgs Load(Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry from the Holochain Conductor using either the EntryHash property or entryHash param passed into one of the overloads for this method. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event.
ZomeFunctionCallBackEventArgs Load(string entryHash, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry from the Holochain Conductor using either the EntryHash property or entryHash param passed into one of the overloads for this method. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event.
Task<ZomeFunctionCallBackEventArgs> LoadAsync(Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry from the Holochain Conductor using either the EntryHash property or entryHash param passed into one of the overloads for this method. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event.
Task<ZomeFunctionCallBackEventArgs> LoadAsync(string entryHash, Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry from the Holochain Conductor using either the EntryHash property or entryHash param passed into one of the overloads for this method. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event.
ZomeFunctionCallBackEventArgs LoadByCustomField(string customFieldToLoadByValue, string customFieldToLoadByKey = "", Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
Task<ZomeFunctionCallBackEventArgs> LoadByCustomFieldAsync(string customFieldToLoadByValue, string customFieldToLoadByKey = "", Dictionary<string, string> customDataKeyValuePairs = null, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will load the Holochain entry from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadEntryFunction or property ZomeLoadEntryFunction and then maps the data returned from the zome call onto your data object. It will then raise the OnLoaded event. NOTE: The corresponding rust Holochain Entry in your hApp will need to have the same properties contained in your class and have the correct mappings using the HolochainFieldName attribute. Please see HoloNETEntryBase in the documentation/README on the GitHub repo https://github.com/NextGenSoftwareUK/holochain-client-csharp for more info...
ZomeFunctionCallBackEventArgs Save(Dictionary<string, string> customDataKeyValuePairs = null, Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePairs = null, bool cachePropertyInfos = true, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will save the Holochain entry to the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeCreateEntryFunction or property ZomeCreateEntryFunction if it is a new entry (empty object) or the zomeUpdateEntryFunction param and ZomeUpdateEntryFunction property if it's an existing entry (previously saved object containing a valid value for the EntryHash property). Once it has saved the entry it will then update the EntryHash property with the entry hash returned from the zome call/conductor. The PreviousVersionEntryHash property is also set to the previous EntryHash (if there is one). Once it has finished saving and got a response from the Holochain Conductor it will raise the OnSaved event.
ZomeFunctionCallBackEventArgs Save(object paramsObject, bool autoGeneratUpdatedEntryObjectAndOriginalEntryHashRustParams = true, string updatedEntryRustParamName = "updated_entry", string originalEntryHashRustParamName = "original_action_hash", bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will save the Holochain entry to the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeCreateEntryFunction or property ZomeCreateEntryFunction if it is a new entry (empty object) or the zomeUpdateEntryFunction param and ZomeUpdateEntryFunction property if it's an existing entry (previously saved object containing a valid value for the EntryHash property). Once it has saved the entry it will then update the EntryHash property with the entry hash returned from the zome call/conductor. The PreviousVersionEntryHash property is also set to the previous EntryHash (if there is one). Once it has finished saving and got a response from the Holochain Conductor it will raise the OnSaved event.
Task<ZomeFunctionCallBackEventArgs> SaveAsync(Dictionary<string, string> customDataKeyValuePairs = null, Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePairs = null, bool cachePropertyInfos = true, bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will save the Holochain entry to the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeCreateEntryFunction or property ZomeCreateEntryFunction if it is a new entry (empty object) or the zomeUpdateEntryFunction param and ZomeUpdateEntryFunction property if it's an existing entry (previously saved object containing a valid value for the EntryHash property). Once it has saved the entry it will then update the EntryHash property with the entry hash returned from the zome call/conductor. The PreviousVersionEntryHash property is also set to the previous EntryHash (if there is one). Once it has finished saving and got a response from the Holochain Conductor it will raise the OnSaved event.
Task<ZomeFunctionCallBackEventArgs> SaveAsync(object paramsObject, bool autoGeneratUpdatedEntryObjectAndOriginalEntryHashRustParams = true, string updatedEntryRustParamName = "updated_entry", string originalEntryHashRustParamName = "original_action_hash", bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will save the Holochain entry to the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeCreateEntryFunction or property ZomeCreateEntryFunction if it is a new entry (empty object) or the zomeUpdateEntryFunction param and ZomeUpdateEntryFunction property if it's an existing entry (previously saved object containing a valid value for the EntryHash property). Once it has saved the entry it will then update the EntryHash property with the entry hash returned from the zome call/conductor. The PreviousVersionEntryHash property is also set to the previous EntryHash (if there is one). Once it has finished saving and got a response from the Holochain Conductor it will raise the OnSaved event.
Task<ReadyForZomeCallsEventArgs> WaitTillHoloNETInitializedAsync() method This mehod will call the WaitTillReadyForZomeCallsAsync method on the HoloNET Client.

IHoloNETObservableCollection<T> (interface)

Member Kind Description
List<T> EntriesAddedSinceLastSaved { get; } property The entries that have been added since the last time the Save/SaveAsync method has been called. When Save/SaveAsync is next called this list will be emptied once the save is successfull.
List<T> EntriesRemovedSinceLastSaved { get; } property The entries that have been removed since the last time the Save/SaveAsync method has been called. When Save/SaveAsync is next called this list will be emptied once the save is successfull.
IHoloNETClientAppBase HoloNETClient { get; set; } property This is a reference to the internal instance of the HoloNET Client (either the one passed in through a constructor or one created internally.)
bool IsChanges { get; } property This will be true if any chnages have been made to this collection (entries added, removed or updated) since the last time the Save/SaveAsync functions were called. After they have been called it will be reset to false.
bool IsInitialized { get; } property This will return true once HoloNETEntryBaseClass and it's internal HoloNET client have finished initializing and the OnInitialized event has been raised. See also the IsInitializing property and the Initialize method.
bool IsInitializing { get; } property This will return true whilst HoloNETEntryBaseClass and it's internal HoloNET client is initializing. The Initialize method will begin the initialization process. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. Once the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then raised the OnReadyForZomeCalls event it will raise the OnInitialized event. See also the IsInitialized property. |
List<T> OriginalEntries { get; } property This contains the original entries since the last time this collection was loaded or saved.
string ZomeAddEntryToCollectionFunction { get; set; } property The name of the zome function to call to add a HoloNETEntry to a collection.
string ZomeBatchUpdateCollectionFunction { get; set; } property The name of the zome function to call to batch update all changes made to the collection (entries added, removed and updated (optional)),
string ZomeLoadCollectionFunction { get; set; } property The name of the zome function to call to load a collection of entries.
string ZomeName { get; set; } property This is the name of the rust zome in your hApp that this instance of the HoloNETEntryBaseClass maps onto. You can set this either through this property or through one of the constructors.
string ZomeRemoveEntryFromCollectionFunction { get; set; } property The name of the zome function to call to remove a HoloNETEntry from a collection.
Closed<T> OnClosed event Fired after the Close method has finished closing the connection to the Holochain Conductor and has shutdown all running Holochain Conductors (if configured to do so). This method calls the ShutdownHoloNET internally.
CollectionLoaded<T> OnCollectionLoaded event Fired after the LoadCollection method has finished loading the Holochain Collection from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadCollectionFunction or property ZomeLoadCollectionFunction and then maps the data returned from the zome call onto your collection.
CollectionSaved<T> OnCollectionSaved event Fired after the Save/SaveAsync method has finished saving all HoloNET Entries that were either added, removed or updated. This may optionally update the collection in one batch operation. See Save/SaveAsync for more info.
Error<T> OnError event Fired when there is an error either in HoloNETEntryBaseClass or the HoloNET client itself.
HoloNETEntryAddedToCollection<T> OnHoloNETEntryAddedToCollection event Fired after an HoloNET Entry has been added to the collection. This can be from either calling the AddHoloNETEntryToCollection function or from the SaveCollection function which will automatically add any new entries to the collection. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeAddEntryToCollectionFunction or property ZomeAddEntryToCollectionFunction.
HoloNETEntryRemovedFromCollection<T> OnHoloNETEntryRemovedFromCollection event Fired after an HoloNET Entry has been removed from the collection. This can be from either calling the RemoveHoloNETEntryFromCollection function or from the SaveCollection function which will automatically remove any old entries from the collection (ones that have been removed in c# client side code but not yet synced with the rust backend code). This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeRemoveEntryToCollectionFunction or property ZomeRemoveEntryToCollectionFunction.
Initialized<T> OnInitialized event Fired after the Initialize method has finished initializing the HoloNET client. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. This event is then fired when the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then fired the OnReadyForZomeCalls event. See also the IsInitializing and the IsInitialized properties.
ZomeFunctionCallBackEventArgs AddHoloNETEntryToCollectionAndSave(T holoNETEntry, bool saveHoloNETEntry = true, string collectionAnchor = "") method This method will add the HoloNETEntry to the collection. If 'saveHoloNETEntry' is set to true (default) it will call the SaveAsync method on the HoloNETEntry before adding it to the collection. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param 'zomeAddEntryToCollectionFunction' or property 'ZomeAddEntryToCollectionFunction'. It will then raise the OnHoloNETEntryAddedToCollection event.
Task<ZomeFunctionCallBackEventArgs> AddHoloNETEntryToCollectionAndSaveAsync(T holoNETEntry, bool saveHoloNETEntry = true, string collectionAnchor = "", bool useReflectionToMapKeyValuePairResponseOntoEntryDataObject = true) method This method will add the HoloNETEntry to the collection. If 'saveHoloNETEntry' is set to true (default) it will call the SaveAsync method on the HoloNETEntry before adding it to the collection. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param 'zomeAddEntryToCollectionFunction' or property 'ZomeAddEntryToCollectionFunction'. It will then raise the OnHoloNETEntryAddedToCollection event.
HoloNETShutdownEventArgs Close(ShutdownHolochainConductorsMode shutdownHolochainConductorsMode = UseHoloNETDNASettings) method Will close this HoloNET Entry and then shutdown its internal HoloNET instance (if one was not passed in) and its current connetion to the Holochain Conductor and then shutdown all running Holochain Conductors (if configured to do so) as well as any other tasks to shut HoloNET down cleanly. This method calls the ShutdownHoloNET method internally. Once it has finished shutting down HoloNET it will raise the OnClosed event. You can specify if HoloNET should wait until it has finished disconnecting and shutting down the conductors before returning to the caller or whether it should return immediately and then use the OnDisconnected, OnHolochainConductorsShutdownComplete & OnHoloNETShutdownComplete events to notify the caller.
Task<HoloNETShutdownEventArgs> CloseAsync(DisconnectedCallBackMode disconnectedCallBackMode = WaitForHolochainConductorToDisconnect, ShutdownHolochainConductorsMode shutdownHolochainConductorsMode = UseHoloNETDNASettings) method Will close this HoloNET Entry and then shutdown its internal HoloNET instance (if one was not passed in) and its current connetion to the Holochain Conductor and then shutdown all running Holochain Conductors (if configured to do so) as well as any other tasks to shut HoloNET down cleanly. This method calls the ShutdownHoloNET method internally. Once it has finished shutting down HoloNET it will raise the OnClosed event. You can specify if HoloNET should wait until it has finished disconnecting and shutting down the conductors before returning to the caller or whether it should return immediately and then use the OnDisconnected, OnHolochainConductorsShutdownComplete & OnHoloNETShutdownComplete events to notify the caller.
void Initialize(bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) method This method will Initialize the HoloNETEntryBaseClass along with the internal HoloNET Client and will raise the OnInitialized event once it has finished initializing. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. Once the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then raised the OnReadyForZomeCalls event it will raise the OnInitialized event. See also the IsInitializing and the IsInitialized properties.
Task InitializeAsync(ConnectedCallBackMode connectedCallBackMode = WaitForHolochainConductorToConnect, RetrieveAgentPubKeyAndDnaHashMode retrieveAgentPubKeyAndDnaHashMode = Wait, bool retrieveAgentPubKeyAndDnaHashFromConductor = true, bool retrieveAgentPubKeyAndDnaHashFromSandbox = true, bool automaticallyAttemptToRetrieveFromConductorIfSandBoxFails = true, bool automaticallyAttemptToRetrieveFromSandBoxIfConductorFails = true, bool updateHoloNETDNAWithAgentPubKeyAndDnaHashOnceRetrieved = true) method This method will Initialize the HoloNETEntryBaseClass along with the internal HoloNET Client and will raise the OnInitialized event once it has finished initializing. This will also call the Connect and RetrieveAgentPubKeyAndDnaHash methods on the HoloNET client. Once the HoloNET client has successfully connected to the Holochain Conductor, retrieved the AgentPubKey & DnaHash & then raised the OnReadyForZomeCalls event it will raise the OnInitialized event. See also the IsInitializing and the IsInitialized properties.
HoloNETCollectionLoadedResult<T> LoadCollection(string collectionAnchor = "", Dictionary<string, string> customDataKeyValuePairs = null) method This method will load the entries for this collection from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadCollectionFunction or property ZomeLoadCollectionFunction and then maps the data returned from the zome call onto your collection of data objects. It will then raise the OnCollectionLoaded event.
Task<HoloNETCollectionLoadedResult<T>> LoadCollectionAsync(string collectionAnchor = "", Dictionary<string, string> customDataKeyValuePairs = null) method This method will load the entries for this collection from the Holochain Conductor. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param zomeLoadCollectionFunction or property ZomeLoadCollectionFunction and then maps the data returned from the zome call onto your collection of data objects. It will then raise the OnCollectionLoaded event.
ZomeFunctionCallBackEventArgs RemoveHoloNETEntryFromCollectionAndSave(T holoNETEntry, string collectionAnchor = "") method This method will remnove the HoloNETEntry from the collection. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param 'zomeRemoveEntryFromCollectionFunction' or property 'ZomeRemoveEntryFromCollectionFunction'. It will then raise the OnHoloNETEntryRemovedFromCollection event.
Task<ZomeFunctionCallBackEventArgs> RemoveHoloNETEntryFromCollectionAndSaveAsync(T holoNETEntry, string collectionAnchor = "") method This method will remnove the HoloNETEntry from the collection. This calls the CallZomeFunction on the HoloNET client passing in the zome function name specified in the constructor param 'zomeRemoveEntryFromCollectionFunction' or property 'ZomeRemoveEntryFromCollectionFunction'. It will then raise the OnHoloNETEntryRemovedFromCollection event.
HoloNETCollectionSavedResult SaveAllChanges(bool saveChangesMadeToEntries = true, bool saveAsOneBatchOperation = true, bool saveHoloNETEntryWhenAddingToCollection = true, bool continueOnError = true, string collectionAnchor = "", Dictionary<string, string> customDataKeyValuePairs = null, Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePairs = null, bool cachePropertyInfos = true) method This method will save all changes made to the collection since the last time this method was called and persist the changes to the Holochain Conductor. This includes any entries that were added or removed to the collection via the Add and Remove methods (in-memory only). It also persists any entries that were updated if the 'saveChangesMadeToEntries' param is set to true (defaults to true). If entries were added or removed via the AddHoloNETEntryToCollectionAndSave and RemoveHoloNETEntryFromCollectionAndSave methods then these entries will NOT be added/removed again. If the 'saveAsOneBatchOperation' param is set to true (default), any new entries added, old entries removed or entries changed will be updated as one batch operation. This will be faster than making many seperate calls for adding, remove or updating entries. For this to work you need to make sure the 'ZomeBatchUpdateCollectionFunction' is set or was passed in via one of the constructors, it will then batch update any entries that have changed (added, removed or changed) since the last time this method was called. If 'saveAsOneBatchOperation' is set to false then it will call the SaveAsync method for updating each entry (if 'saveChangesMadeToEntries' is set to true), 'AddHoloNETEntryToCollectionAndSaveAsync' for adding new entries and 'RemoveHoloNETEntryFromCollectionAndSaveAsync' for removing old entries. This of course will be slower than updating them as a batch depending on the size of the collection. This will invoke the 'OnCollectionSaved' event once it has finished saving any changes to the collection.
Task<HoloNETCollectionSavedResult> SaveAllChangesAsync(bool saveChangesMadeToEntries = true, bool saveAsOneBatchOperation = true, bool saveHoloNETEntryWhenAddingToCollection = true, bool continueOnError = true, string collectionAnchor = "", Dictionary<string, string> customDataKeyValuePairs = null, Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePairs = null, bool cachePropertyInfos = true) method This method will save all changes made to the collection since the last time this method was called and persist the changes to the Holochain Conductor. This includes any entries that were added or removed to the collection via the Add and Remove methods (in-memory only). It also persists any entries that were updated if the 'saveChangesMadeToEntries' param is set to true (defaults to true). If entries were added or removed via the AddHoloNETEntryToCollectionAndSave and RemoveHoloNETEntryFromCollectionAndSave methods then these entries will NOT be added/removed again. If the 'saveAsOneBatchOperation' param is set to true (default), any new entries added, old entries removed or entries changed will be updated as one batch operation. This will be faster than making many seperate calls for adding, remove or updating entries. For this to work you need to make sure the 'ZomeBatchUpdateCollectionFunction' is set or was passed in via one of the constructors, it will then batch update any entries that have changed (added, removed or changed) since the last time this method was called. If 'saveAsOneBatchOperation' is set to false then it will call the SaveAsync method for updating each entry (if 'saveChangesMadeToEntries' is set to true), 'AddHoloNETEntryToCollectionAndSaveAsync' for adding new entries and 'RemoveHoloNETEntryFromCollectionAndSaveAsync' for removing old entries. This of course will be slower than updating them as a batch depending on the size of the collection. This will invoke the 'OnCollectionSaved' event once it has finished saving any changes to the collection.
void UpdateEnriesState(Dictionary<string, bool> holochainFieldsIsEnabledKeyValuePairs = null, bool cachePropertyInfos = true) method Updates the collection's entries state (added, removed or updated).
Task<ReadyForZomeCallsEventArgs> WaitTillHoloNETInitializedAsync() method This mehod will call the WaitTillReadyForZomeCallsAsync method on the HoloNET Client.