protected virtual void Dispose(bool disposing) { if (disposing) { //Release managed resources and call Dispose for member variables } //Release unmanaged resources BinaryNative.kth_core_binary_destruct(nativeInstance_); }
/// <summary> /// Creates a binary filter from an int array. /// </summary> /// <param name="bitsSize"> Elements size </param> /// <param name="blocks"> Filter representation. Example: '[186,173,240,13]'. </param> /// <param name="n"> Array length in amount of elements. </param> public Binary(UInt64 bitsSize, byte[] blocks, UInt64 n) { nativeInstance_ = BinaryNative.kth_core_binary_construct_blocks((UIntPtr)bitsSize, blocks, (UIntPtr)n); }
/// <summary> /// Creates a binary filter from a binary string. /// </summary> /// <param name="hexString"> Binary string. Example: '10111010101011011111000000001101' </param> public Binary(string hexString) { nativeInstance_ = BinaryNative.kth_core_binary_construct_string(hexString); }
/// <summary> /// Create an empty binary object. /// </summary> public Binary() { nativeInstance_ = BinaryNative.kth_core_binary_construct(); }