summaryrefslogtreecommitdiff
path: root/src/bindings/mono/eo_mono/NativeModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bindings/mono/eo_mono/NativeModule.cs')
-rw-r--r--src/bindings/mono/eo_mono/NativeModule.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/bindings/mono/eo_mono/NativeModule.cs b/src/bindings/mono/eo_mono/NativeModule.cs
new file mode 100644
index 0000000..324a933
--- /dev/null
+++ b/src/bindings/mono/eo_mono/NativeModule.cs
@@ -0,0 +1,33 @@
1using System;
2
3namespace Efl { namespace Eo {
4
5public partial class NativeModule : IDisposable
6{
7 private Lazy<IntPtr> module;
8
9 public NativeModule(string libName)
10 {
11 module = new Lazy<IntPtr>
12 (() =>
13 {
14 return LoadLibrary(libName);
15 });
16 }
17
18 public IntPtr Module
19 {
20 get
21 {
22 return module.Value;
23 }
24 }
25
26 public void Dispose()
27 {
28 UnloadLibrary(module.Value);
29 module = null;
30 }
31}
32
33} }