public override string ToString() { int ntype = CFLibrary.CFGetTypeID(typeRef); if (_CFString == ntype) { return(CFString()); } else if (_CFDictionary == ntype) { return(CFDictionary()); } else if (_CFArray == ntype) { return(CFPropertyList()); } else if (_CFData == ntype) { return(CFData()); } else if (_CFBoolean == ntype) { return(CFBoolean()); } else if (_CFNumber == ntype) { return(CFNumber()); } return(null); }
public override string ToString() { if (typeRef == IntPtr.Zero) { return(null); } switch (CFLibrary.CFGetTypeID(typeRef)) { case _CFString: return(CFString()); case _CFDictionary: return(CFPropertyList()); case _CFArray: return(CFPropertyList()); case _CFData: return(CFData()); case _CFBoolean: return(CFBoolean()); case _CFNumber: return(CFNumber()); } return(null); }
/// <summary> /// Checks if the object is a valid CFData object /// </summary> /// <returns></returns> public bool isData() { return(CFLibrary.CFGetTypeID(typeRef) == _CFData); }
/// <summary> /// Returns the unique identifier of an opaque type to which a CoreFoundation object belongs /// </summary> /// <returns></returns> public int GetTypeID() { return(CFLibrary.CFGetTypeID(typeRef)); }
/// <summary> /// Checks if the current object is a valid CFString object /// </summary> /// <returns></returns> public bool isString() { return(CFLibrary.CFGetTypeID(typeRef) == _CFString); }