Esempio n. 1
0
 public ComponentCollectionSwigWrapper(
     ComponentMetaDataCollectionSwig instance,
     DeviceDetectionHashEngine engine)
 {
     _object = instance;
     _engine = engine;
 }
        public ComponentMetaDataCollectionSwig getComponents()
        {
            global::System.IntPtr           cPtr = DeviceDetectionHashEngineModulePINVOKE.MetaDataSwig_getComponents(swigCPtr);
            ComponentMetaDataCollectionSwig ret  = (cPtr == global::System.IntPtr.Zero) ? null : new ComponentMetaDataCollectionSwig(cPtr, true);

            if (DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Pending)
            {
                throw DeviceDetectionHashEngineModulePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        internal static IEnumerable <IComponentMetaData> Select(
            this ComponentMetaDataCollectionSwig source,
            Func <ComponentMetaDataSwig, IComponentMetaData> selector)
        {
            for (uint i = 0; i < source.getSize(); i++)
            {
#pragma warning disable CA2000 // Dispose objects before losing scope
                // The IComponentMetaData instance that is created
                // will handle disposal
                yield return(selector(source.getByIndex(i)));

#pragma warning restore CA2000 // Dispose objects before losing scope
            }
        }
Esempio n. 4
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ComponentMetaDataCollectionSwig obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }