Class MemoryStateHolder
Stores states in memory
Inheritance
System.Object
    MemoryStateHolder
  Implements
Inherited Members
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.ToString()
    
  Namespace: TelegramModularFramework.Services.State
Assembly: TelegramModularFramework.dll
Syntax
public class MemoryStateHolder : IStateHolder
  Methods
| Improve this Doc View SourceGetState(Int64)
Retrieves previously set state
Declaration
public async Task<string> GetState(long userId)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int64 | userId | Number represents user  | 
      
Returns
| Type | Description | 
|---|---|
| Task<System.String> | Nullable string state  | 
      
SetState(Int64, String)
Sets state value for user
Declaration
public async Task SetState(long userId, string state)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int64 | userId | Number represents user  | 
      
| System.String | state | String value to store  | 
      
Returns
| Type | Description | 
|---|---|
| Task |