예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
파일: CFData.cs 프로젝트: chencen2000/test1
 /// <summary>
 /// Checks if the object is a valid CFData object
 /// </summary>
 /// <returns></returns>
 public bool isData()
 {
     return(CFLibrary.CFGetTypeID(typeRef) == _CFData);
 }
예제 #4
0
 /// <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));
 }
예제 #5
0
 /// <summary>
 /// Checks if the current object is a valid CFString object
 /// </summary>
 /// <returns></returns>
 public bool isString()
 {
     return(CFLibrary.CFGetTypeID(typeRef) == _CFString);
 }