internal Dictionary <string, OleDbPropertyInfo> GetValues() { Dictionary <string, OleDbPropertyInfo> propertyLookup = null; bool mustRelease = false; RuntimeHelpers.PrepareConstrainedRegions(); try { DangerousAddRef(ref mustRelease); if (ADP.PtrZero != this.handle) { propertyLookup = new Dictionary <string, OleDbPropertyInfo>(StringComparer.OrdinalIgnoreCase); IntPtr setPtr = this.handle; tagDBPROPINFO propinfo = new tagDBPROPINFO(); tagDBPROPINFOSET propinfoset = new tagDBPROPINFOSET(); for (int i = 0; i < setCount; ++i, setPtr = ADP.IntPtrOffset(setPtr, ODB.SizeOf_tagDBPROPINFOSET)) { Marshal.PtrToStructure(setPtr, propinfoset); int infoCount = propinfoset.cPropertyInfos; IntPtr infoPtr = propinfoset.rgPropertyInfos; for (int k = 0; k < infoCount; ++k, infoPtr = ADP.IntPtrOffset(infoPtr, ODB.SizeOf_tagDBPROPINFO)) { Marshal.PtrToStructure(infoPtr, propinfo); OleDbPropertyInfo propertyInfo = new OleDbPropertyInfo(); propertyInfo._propertySet = propinfoset.guidPropertySet; propertyInfo._propertyID = propinfo.dwPropertyID; propertyInfo._flags = propinfo.dwFlags; propertyInfo._vtype = propinfo.vtType; propertyInfo._supportedValues = propinfo.vValue; propertyInfo._description = propinfo.pwszDescription; propertyInfo._lowercase = propinfo.pwszDescription.ToLower(CultureInfo.InvariantCulture); propertyInfo._type = PropertyInfoSet.FromVtType(propinfo.vtType); if (Bid.AdvancedOn) { Bid.Trace("<oledb.struct.OleDbPropertyInfo|INFO|ADV> \n");//, propertyInfo); } propertyLookup[propertyInfo._lowercase] = propertyInfo; } } } } finally { if (mustRelease) { DangerousRelease(); } } return(propertyLookup); }
internal Dictionary <string, OleDbPropertyInfo> GetPropertyInfo(Guid[] propertySets) { bool isopen = HasSession; OleDbConnectionString constr = ConnectionString; Dictionary <string, OleDbPropertyInfo> properties = null; if (null == propertySets) { propertySets = new Guid[0]; } using (PropertyIDSet propidset = new PropertyIDSet(propertySets)) { using (IDBPropertiesWrapper idbProperties = IDBProperties()) { using (PropertyInfoSet infoset = new PropertyInfoSet(idbProperties.Value, propidset)) { properties = infoset.GetValues(); } } } return(properties); }
internal Dictionary <string, OleDbPropertyInfo> GetPropertyInfo(Guid[] propertySets) { bool hasSession = this.HasSession; if (propertySets == null) { propertySets = new Guid[0]; } using (PropertyIDSet set2 = new PropertyIDSet(propertySets)) { using (IDBPropertiesWrapper wrapper = this.IDBProperties()) { using (PropertyInfoSet set = new PropertyInfoSet(wrapper.Value, set2)) { return(set.GetValues()); } } } }
internal Dictionary <string, OleDbPropertyInfo>?GetPropertyInfo(Guid[] propertySets) { Dictionary <string, OleDbPropertyInfo>?properties = null; if (null == propertySets) { propertySets = Array.Empty <Guid>(); } using (PropertyIDSet propidset = new PropertyIDSet(propertySets)) { using (IDBPropertiesWrapper idbProperties = IDBProperties()) { using (PropertyInfoSet infoset = new PropertyInfoSet(idbProperties.Value, propidset)) { properties = infoset.GetValues(); } } } return(properties); }
internal Dictionary<string,OleDbPropertyInfo> GetPropertyInfo(Guid[] propertySets) { bool isopen = HasSession; OleDbConnectionString constr = ConnectionString; Dictionary<string,OleDbPropertyInfo> properties = null; if (null == propertySets) { propertySets = new Guid[0]; } using(PropertyIDSet propidset = new PropertyIDSet(propertySets)) { using(IDBPropertiesWrapper idbProperties = IDBProperties()) { using(PropertyInfoSet infoset = new PropertyInfoSet(idbProperties.Value, propidset)) { properties = infoset.GetValues(); } } } return properties; }