diff --git a/modules/csharp_api/csharp/common/element_type.cs b/modules/csharp_api/csharp/common/element_type.cs index dc20b464c..cefe0f5c3 100644 --- a/modules/csharp_api/csharp/common/element_type.cs +++ b/modules/csharp_api/csharp/common/element_type.cs @@ -35,7 +35,6 @@ public OvType(string type) : base (type) { } }; namespace element { - /// /// Enum to define possible element types /// ov_element_c#_api @@ -115,7 +114,6 @@ public enum Type_t /// u64 }; - /// /// [struct] Type information storage struct. /// diff --git a/modules/csharp_api/csharp/common/version.cs b/modules/csharp_api/csharp/common/version.cs index 0fafe4f0d..056c6a95a 100644 --- a/modules/csharp_api/csharp/common/version.cs +++ b/modules/csharp_api/csharp/common/version.cs @@ -21,7 +21,11 @@ public struct Version /// A null terminated description string /// public string description; - + /// + /// Constructs a Version. + /// + /// + /// public Version(string buildNumber, string description) { this.buildNumber = buildNumber; this.description = description; @@ -67,9 +71,4 @@ public struct CoreVersionList /// public ulong size; } - - - - - } diff --git a/modules/csharp_api/csharp/core/core.cs b/modules/csharp_api/csharp/core/core.cs index 71d6a1476..0c2995217 100644 --- a/modules/csharp_api/csharp/core/core.cs +++ b/modules/csharp_api/csharp/core/core.cs @@ -257,8 +257,6 @@ public CompiledModel compile_model(string model_path) NativeMethods.ov_core_compile_model_from_file(m_ptr, ref c_model[0], ref c_device[0], 0, ref compiled_model_ptr)); return new CompiledModel(compiled_model_ptr); } - - /// /// Reads a model and creates a compiled model from the IR/ONNX/PDPD file. /// diff --git a/modules/csharp_api/csharp/core/layout.cs b/modules/csharp_api/csharp/core/layout.cs index df3679be5..02b305065 100644 --- a/modules/csharp_api/csharp/core/layout.cs +++ b/modules/csharp_api/csharp/core/layout.cs @@ -25,7 +25,7 @@ namespace OpenVinoSharp /// - To set/get model's batch (see `ov::get_batch`/`ov::set_batch') it is required in general to specify 'N' dimension /// in layout for appropriate inputs /// - public class Layout + public class Layout : IDisposable { /// /// [private]Layout class pointer. @@ -66,13 +66,13 @@ public Layout(string layout_desc) /// ~Layout() { - dispose(); + Dispose(); } /// /// Release unmanaged resources. /// - public void dispose() + public void Dispose() { if (m_ptr == IntPtr.Zero) { diff --git a/modules/csharp_api/csharp/core/node.cs b/modules/csharp_api/csharp/core/node.cs index 94f7ce01f..25f7e1faf 100644 --- a/modules/csharp_api/csharp/core/node.cs +++ b/modules/csharp_api/csharp/core/node.cs @@ -56,7 +56,8 @@ public Node(IntPtr ptr, NodeType type) /// /// Default deconstruction. /// - ~Node() { + ~Node() + { Dispose(); } /// diff --git a/modules/csharp_api/csharp/core/node_output.cs b/modules/csharp_api/csharp/core/node_output.cs index 283de79ae..749814fca 100644 --- a/modules/csharp_api/csharp/core/node_output.cs +++ b/modules/csharp_api/csharp/core/node_output.cs @@ -10,7 +10,8 @@ namespace OpenVinoSharp /// A handle for one of a node's outputs. /// /// - public class Output { + public class Output : IDisposable + { private Node m_node; private ulong m_index = 0; /// @@ -28,12 +29,12 @@ public Output(Node node, ulong index) /// ~Output() { - dispose(); + Dispose(); } /// /// Release unmanaged resources. /// - public void dispose() + public void Dispose() { m_node.Dispose(); } diff --git a/modules/csharp_api/csharp/core/partial_shape.cs b/modules/csharp_api/csharp/core/partial_shape.cs index 83769d310..16c429779 100644 --- a/modules/csharp_api/csharp/core/partial_shape.cs +++ b/modules/csharp_api/csharp/core/partial_shape.cs @@ -22,9 +22,6 @@ namespace OpenVinoSharp /// public class PartialShape { - - - /// /// PartialShape rank. /// @@ -34,7 +31,6 @@ public class PartialShape /// PartialShape dimensions. /// private Dimension[] dimensions; - /// /// Constructing partial shape by ov_partial_shape. /// @@ -77,7 +73,6 @@ public PartialShape(Dimension rank, Dimension[] dimensions) /// The partial shape dimensions list. public PartialShape(Dimension rank, List dimensions) : this(rank, dimensions.ToArray()) { - } /// /// Constructing static partial shape by dimensions. @@ -98,7 +93,8 @@ public PartialShape(long rank, long[] dimensions) /// The partial shape rank. /// The partial shape dimensions list. public PartialShape(long rank, List dimensions) : this(rank, dimensions.ToArray()) - {} + { + } /// /// Constructing static partial shape by shape.