Skip to content

Commit

Permalink
Merge pull request #3269 from unoplatform/dev/jela/localsettings
Browse files Browse the repository at this point in the history
fix(ApplicationDataContainer): Update WebAssembly storage to use javascript `localStorage`
  • Loading branch information
jeromelaban committed Jun 1, 2020
2 parents 2c77bf6 + ab8d2a0 commit 3aadab4
Show file tree
Hide file tree
Showing 19 changed files with 1,377 additions and 119 deletions.
103 changes: 103 additions & 0 deletions src/Uno.UI.Wasm/WasmScripts/Uno.UI.d.ts
Expand Up @@ -533,6 +533,71 @@ declare namespace Uno.UI {
setCursor(cssCursor: string): string;
}
}
declare class ApplicationDataContainer_ClearParams {
Locality: string;
static unmarshal(pData: number): ApplicationDataContainer_ClearParams;
}
declare class ApplicationDataContainer_ContainsKeyParams {
Key: string;
Value: string;
Locality: string;
static unmarshal(pData: number): ApplicationDataContainer_ContainsKeyParams;
}
declare class ApplicationDataContainer_ContainsKeyReturn {
ContainsKey: boolean;
marshal(pData: number): void;
}
declare class ApplicationDataContainer_GetCountParams {
Locality: string;
static unmarshal(pData: number): ApplicationDataContainer_GetCountParams;
}
declare class ApplicationDataContainer_GetCountReturn {
Count: number;
marshal(pData: number): void;
}
declare class ApplicationDataContainer_GetKeyByIndexParams {
Locality: string;
Index: number;
static unmarshal(pData: number): ApplicationDataContainer_GetKeyByIndexParams;
}
declare class ApplicationDataContainer_GetKeyByIndexReturn {
Value: string;
marshal(pData: number): void;
}
declare class ApplicationDataContainer_GetValueByIndexParams {
Locality: string;
Index: number;
static unmarshal(pData: number): ApplicationDataContainer_GetValueByIndexParams;
}
declare class ApplicationDataContainer_GetValueByIndexReturn {
Value: string;
marshal(pData: number): void;
}
declare class ApplicationDataContainer_RemoveParams {
Locality: string;
Key: string;
static unmarshal(pData: number): ApplicationDataContainer_RemoveParams;
}
declare class ApplicationDataContainer_RemoveReturn {
Removed: boolean;
marshal(pData: number): void;
}
declare class ApplicationDataContainer_SetValueParams {
Key: string;
Value: string;
Locality: string;
static unmarshal(pData: number): ApplicationDataContainer_SetValueParams;
}
declare class ApplicationDataContainer_TryGetValueParams {
Key: string;
Locality: string;
static unmarshal(pData: number): ApplicationDataContainer_TryGetValueParams;
}
declare class ApplicationDataContainer_TryGetValueReturn {
Value: string;
HasValue: boolean;
marshal(pData: number): void;
}
declare class StorageFolderMakePersistentParams {
Paths_Length: number;
Paths: Array<string>;
Expand Down Expand Up @@ -806,6 +871,44 @@ declare const MonoRuntime: Uno.UI.Interop.IMonoRuntime;
declare const WebAssemblyApp: Uno.UI.Interop.IWebAssemblyApp;
declare const UnoAppManifest: Uno.UI.IAppManifest;
declare const UnoDispatch: Uno.UI.Interop.IUnoDispatch;
declare namespace Windows.Storage {
class ApplicationDataContainer {
private static buildStorageKey;
private static buildStoragePrefix;
/**
* Try to get a value from localStorage
* */
private static tryGetValue;
/**
* Set a value to localStorage
* */
private static setValue;
/**
* Determines if a key is contained in localStorage
* */
private static containsKey;
/**
* Gets a key by index in localStorage
* */
private static getKeyByIndex;
/**
* Determines the number of items contained in localStorage
* */
private static getCount;
/**
* Clears items contained in localStorage
* */
private static clear;
/**
* Removes an item contained in localStorage
* */
private static remove;
/**
* Gets a key by index in localStorage
* */
private static getValueByIndex;
}
}
declare namespace Windows.Storage {
class StorageFolder {
private static _isInit;
Expand Down

0 comments on commit 3aadab4

Please sign in to comment.