DotNet64¤
Communicates with the dotnet_lib32 library via the DotNet32 class that is running on a server.
DotNet64 ¤
DotNet64()
Bases: Client64
Communicates with a 32-bit .NET library.
This class demonstrates how to communicate with a 32-bit .NET library if an instance of this class is created within a 64-bit Python interpreter.
Source code in src/msl/examples/loadlib/dotnet64.py
17 18 19 20 21 22 23 24 25 |
|
add_integers ¤
add_integers(a, b)
Add two integers.
See the corresponding DotNet32.add_integers method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a
|
int
|
First integer. |
required |
b
|
int
|
Second integer. |
required |
Returns:
Type | Description |
---|---|
int
|
The sum, |
Source code in src/msl/examples/loadlib/dotnet64.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
add_multiple ¤
add_multiple(a, b, c, d, e)
Add multiple integers.
Calls a static method in a static class.
See the corresponding DotNet32.add_multiple method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a
|
int
|
First integer. |
required |
b
|
int
|
Second integer. |
required |
c
|
int
|
Third integer. |
required |
d
|
int
|
Fourth integer. |
required |
e
|
int
|
Fifth integer. |
required |
Returns:
Type | Description |
---|---|
int
|
The sum of the input arguments. |
Source code in src/msl/examples/loadlib/dotnet64.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
|
add_or_subtract ¤
add_or_subtract(a, b, *, do_addition)
Add or subtract two C# double-precision numbers.
See the corresponding DotNet32.add_or_subtract method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a
|
float
|
First double-precision number. |
required |
b
|
float
|
Second double-precision number. |
required |
do_addition
|
bool
|
Whether to add or subtract the numbers. |
required |
Returns:
Type | Description |
---|---|
float
|
|
Source code in src/msl/examples/loadlib/dotnet64.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
|
concatenate ¤
concatenate(a, b, c, d, e)
Concatenate strings.
Calls a static method in a static class.
See the corresponding DotNet32.concatenate method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a
|
str
|
First string. |
required |
b
|
str
|
Second string. |
required |
c
|
str
|
Third string. |
required |
d
|
bool
|
Whether to include |
required |
e
|
str
|
Fourth string. |
required |
Returns:
Type | Description |
---|---|
str
|
The strings concatenated together. |
Source code in src/msl/examples/loadlib/dotnet64.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
|
divide_floats ¤
divide_floats(a, b)
Divide two C# floating-point numbers.
See the corresponding DotNet32.divide_floats method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a
|
float
|
The numerator. |
required |
b
|
float
|
The denominator. |
required |
Returns:
Type | Description |
---|---|
float
|
The quotient, |
Source code in src/msl/examples/loadlib/dotnet64.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|
get_class_names ¤
get_class_names()
Gets the class names in the library.
Calls GetTypes using the assembly property.
See the corresponding DotNet32.get_class_names method.
Returns:
Type | Description |
---|---|
list[str]
|
The names of the classes that are available in dotnet_lib32.dll. |
Source code in src/msl/examples/loadlib/dotnet64.py
27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
multiply_doubles ¤
multiply_doubles(a, b)
Multiply two C# double-precision numbers.
See the corresponding DotNet32.multiply_doubles method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a
|
float
|
First double-precision number. |
required |
b
|
float
|
Second double-precision number. |
required |
Returns:
Type | Description |
---|---|
float
|
The product, |
Source code in src/msl/examples/loadlib/dotnet64.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
|
multiply_matrices ¤
multiply_matrices(a1, a2)
Multiply two matrices.
See the corresponding DotNet32.multiply_matrices method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a1
|
Sequence[Sequence[float]]
|
First matrix. |
required |
a2
|
Sequence[Sequence[float]]
|
Second matrix. |
required |
Return
The product, a1 @ a2
.
Source code in src/msl/examples/loadlib/dotnet64.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
|
reverse_string ¤
reverse_string(original)
Reverse a string.
See the corresponding DotNet32.reverse_string method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
original
|
str
|
The original string. |
required |
Returns:
Type | Description |
---|---|
str
|
The string reversed. |
Source code in src/msl/examples/loadlib/dotnet64.py
134 135 136 137 138 139 140 141 142 143 144 145 146 |
|
scalar_multiply ¤
scalar_multiply(a, xin)
Multiply each element in an array by a number.
See the corresponding DotNet32.scalar_multiply method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a
|
float
|
Scalar value. |
required |
xin
|
Sequence[float]
|
Array to modify. |
required |
Returns:
Type | Description |
---|---|
list[float]
|
A new array with each element in |
Source code in src/msl/examples/loadlib/dotnet64.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
|