Collections
flaui.lib.collections
This module contains collections which can effective handle data transition between C# and Python.
TypeCast
A class that provides methods to convert C# objects to Python objects
cs_datetime(date)
staticmethod
Parses Python date as C# Datetime object
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date
|
date
|
Python date |
required |
cs_timespan(value)
staticmethod
Converts a Python time milliseconds value to C# TimeSpan object
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
int
|
Time in milliseconds |
required |
Returns:
| Type | Description |
|---|---|
Any
|
TimeSpan object from C# System |
Source code in flaui/lib/collections.py
py_dict(raw)
staticmethod
Converts C# Dict to Python Dict
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
raw
|
Any
|
Raw C# Dict object |
required |
Returns:
| Type | Description |
|---|---|
Dict[Any, Any]
|
Converted Python Dict object |
Source code in flaui/lib/collections.py
py_list(raw)
staticmethod
Converts C# Lists to Python lists
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
raw
|
Any
|
Raw C# list object |
required |
Returns:
| Type | Description |
|---|---|
List[Any]
|
Converted Python List object |