/// <summary> /// returns element of a mapping node /// </summary> public FileNode this[string nodeName] { get { ThrowIfDisposed(); if (nodeName == null) { throw new ArgumentNullException(nameof(nodeName)); } IntPtr node = NativeMethods.core_FileNode_operatorThis_byString(ptr, nodeName); if (node == IntPtr.Zero) { return(null); } return(new FileNode(node)); } }
/// <summary> /// returns element of a mapping node /// </summary> public FileNode this[string nodeName] { get { if (disposed) { throw new ObjectDisposedException("FileNode"); } if (nodeName == null) { throw new ArgumentNullException("nodeName"); } IntPtr node = NativeMethods.core_FileNode_operatorThis_byString(ptr, nodeName); if (node == IntPtr.Zero) { return(null); } return(new FileNode(node)); } }
/// <summary> /// returns element of a mapping node /// </summary> public FileNode?this[string nodeName] { get { ThrowIfDisposed(); if (nodeName == null) { throw new ArgumentNullException(nameof(nodeName)); } NativeMethods.HandleException( NativeMethods.core_FileNode_operatorThis_byString(ptr, nodeName, out var node)); GC.KeepAlive(this); if (node == IntPtr.Zero) { return(null); } return(new FileNode(node)); } }