public override void AppendCompareTo(ILProcessor ilProcessor, ParameterDefinition parameterDefinition) { ilProcessor.Append(Instruction.Create(OpCodes.Ldarg_0)); ilProcessor.Append(_thisField.ContainsGenericParameter ? Instruction.Create(OpCodes.Ldflda, GetGenericFieldReference()) : Instruction.Create(OpCodes.Ldfld, GetGenericFieldReference())); if (MemberTypeDefinition.IsStruct) { ilProcessor.Append(Instruction.Create(OpCodes.Stloc_S, LocalVariable)); ilProcessor.Append(Instruction.Create(OpCodes.Ldloca_S, LocalVariable)); } ilProcessor.Append(Instruction.Create(OpCodes.Ldarg_1)); ilProcessor.Append(Instruction.Create(OpCodes.Ldfld, GetGenericFieldReference())); if (MemberTypeDefinition.IsStruct && CompareTo.ByObject()) { ilProcessor.Append(MemberTypeDefinition.Box()); } if (_thisField.ContainsGenericParameter) { ilProcessor.Append(MemberTypeDefinition.Box()); ilProcessor.Append(MemberTypeDefinition.Constrained()); } ilProcessor.Append(MemberTypeDefinition.IsStruct ? Instruction.Create(OpCodes.Call, CompareTo) : Instruction.Create(OpCodes.Callvirt, CompareTo)); }
public Condition(string propName, string compPropName, ConditionType type, Comparison comparison) { this._propName = propName; this._comparison = comparison; this._compPropName = compPropName; this._compareMode = CompareTo.PROP; this._valueType = type; }
public static bool StartsWithAny(this string Sample, params string[] CompareTo) { try { return(CompareTo.Any(Sample.StartsWith)); } catch { return(false); } }
public static bool CompareAll(this string Sample, params string[] CompareTo) { try { return(CompareTo.All(s => string.CompareOrdinal(Sample, s) == 0)); } catch { return(false); } }
public Btree(int Orden, CompareTo <T> compare) { this.Orden = Orden; Min = (Orden - 1) / 2; Max = Orden - 1; this.root = null; this.list = new Lazy <List <T> >(); this.comparador = compare; }
public override List <string> GetVisibleColumns(Group viewBy, OrgLevel orgLevel, CompareTo compareTo, STYP schoolType) { List <string> retval = base.GetVisibleColumns(viewBy, orgLevel, compareTo, schoolType); retval.Add(_ds._v_RetentionWWoDisEconELPSchoolDistState._Total_Enrollment__K_12_Column.ColumnName); retval.Add(_ds._v_RetentionWWoDisEconELPSchoolDistState.Completed_School_TermColumn.ColumnName); retval.Add(_ds._v_RetentionWWoDisEconELPSchoolDistState.Number_of_RetentionsColumn.ColumnName); retval.Add(_ds._v_RetentionWWoDisEconELPSchoolDistState.Retention_RateColumn.ColumnName); return(retval); }
public Condition(string propName, ConditionType type, Comparison comparison, dynamic compare) { this._propName = propName; this._comparison = comparison; this._compareMode = CompareTo.CONSTANT; this._compPropName = "-constant-"; this._valueType = type; if (compare.GetType() != FromConditionType(_valueType)) { throw new Exception("Wrong compare type given to Condition.Compare"); } SetComparisonValue(compare); }
/// <summary> /// Get CompareToEnum In Title /// </summary> /// <param name="orgLevelKey"></param> /// <param name="compareTo"></param> /// <param name="schoolType"></param> /// <param name="s4orALL"></param> /// <param name="regionString"></param> /// <returns></returns> public String GetCompareToInTitle( OrgLevel orgLevel, CompareTo compareTo, STYP schoolType, S4orALL s4orALL, string regionString) { StringBuilder sb = new StringBuilder(); if (compareTo.Key == CompareToKeys.SelSchools || compareTo.Key == CompareToKeys.SelDistricts) { if (s4orALL.Key == S4orALLKeys.AllSchoolsOrDistrictsIn) { if (orgLevel.Key == OrgLevelKeys.School) { sb.AppendFormat(" Compared to All {0} in {1} ", SchoolTypeLabel(schoolType), regionString); } else if (orgLevel.Key == OrgLevelKeys.District) { sb.AppendFormat(" Compared to All Districts in {0} ", regionString); } } else { if (orgLevel.Key == OrgLevelKeys.School) { sb.AppendFormat(" Compared to Selected {0} ", SchoolTypeLabel(schoolType)); } else if (orgLevel.Key == OrgLevelKeys.District) { sb.AppendFormat(" Compared to Selected Districts "); } } } else { if (compareTo.Key == CompareToKeys.OrgLevel && orgLevel.Key == OrgLevelKeys.District) { sb.AppendFormat(" Compared to {0} ", compareTo.Key.Replace("District/", String.Empty)); } else if (compareTo.Key != CompareToKeys.Current) { sb.AppendFormat(" Compared to {0} ", compareTo.Key); } } return(sb.ToString()); }
private List <string> MyGetFullKeysList(CompareTo compareTo, OrgLevel orgLevel, string origFullKey, List <string> compareToSchoolsOrDistrict) { string myOrigFullkey = origFullKey; if (OrgLevel.Key != OrgLevelKeys.School) { //On Post Grad Intent page, if org level == district, school level fullkey should not appear. if (FullKeyUtils.GetOrgLevelFromFullKeyX(origFullKey).Key == OrgLevelKeys.School) { myOrigFullkey = FullKeyUtils.DistrictFullKey(origFullKey); } } return(FullKeyUtils.GetFullKeysList(compareTo, orgLevel, myOrigFullkey, compareToSchoolsOrDistrict, S4orALL)); }
protected virtual string GetClauseForCompareToSchoolsDistrict( string OrigFullKey, S4orALL S4orALL, CompareTo compareTo, OrgLevel orgLevel, string SCounty, string SAthleticConf, string SCESA, SRegion SRegion, out bool useFullkeys) { useFullkeys = false; return(String.Empty); }
private List <string> MyGetFullKeysList(CompareTo compareTo, OrgLevel orgLevel, string origFullKey, List <string> compareToSchoolsOrDistrict) { List <string> retval = new List <string>(); if (OrgLevel.Key == OrgLevelKeys.School) { //For Grad Requirements page: school level data are not available. Use District instead. string maskedFullKey = FullKeyUtils.DistrictFullKey(origFullKey); retval.Add(maskedFullKey); } else { retval = FullKeyUtils.GetFullKeysList(compareTo, orgLevel, origFullKey, compareToSchoolsOrDistrict, S4orALL); } return(retval); }
protected List <string> MyGetFullKeysList( CompareTo compareTo, OrgLevel orgLevel, string origFullKey, List <string> compareToSchoolsOrDistrict) { List <string> retval = FullKeyUtils.GetFullKeysList(compareTo, orgLevel, origFullKey, compareToSchoolsOrDistrict, S4orALL); if (this.OrgLevel.Key != OrgLevelKeys.School) { List <string> maskedVals = new List <string>(); foreach (string fullkey in retval) { string maskedVal = FullKeyUtils.GetMaskedFullkey(fullkey, this.OrgLevel); maskedVals.Add(maskedVal); } retval = maskedVals; } return(retval); }
public static IList <IBook> SortAuthorNameBubble(IList <IBook> books, string order) { CompareTo <string, string> comparer = null; comparer = order == "asc" ? comparer += CompareStringAsc : comparer += CompareStringDesc; for (int p = books.Count - 1; p > 0; p--) { for (int i = 0; i <= p - 1; i++) { if (comparer(books[i].Author.Name, books[i + 1].Author.Name)) { IBook temp = books[i + 1]; books[i + 1] = books[i]; books[i] = temp; } } } return(books); }
//Sorting algorithms //Bubble sort public static IList <IBook> SortYearBubble(IList <IBook> books, string order) { CompareTo <int, int> comparer = null; comparer = order == "asc" ? comparer += CompareIntAsc : comparer += CompareIntDesc; for (int p = books.Count - 1; p > 0; p--) { for (int i = 0; i <= p - 1; i++) { if (comparer(books[i].YearPublished, books[i + 1].YearPublished)) { IBook temp = books[i + 1]; books[i + 1] = books[i]; books[i] = temp; } } } return(books); }
public override bool Validate() { switch (compareType) { case CompareType.EQUALS: return Compared.GetValue() == CompareTo.GetValue(); case CompareType.NOT_EQUALS: return Compared.GetValue() != CompareTo.GetValue(); case CompareType.LOWER_THAN: return Compared.GetValue() < CompareTo.GetValue(); case CompareType.GREATER_THAN: return Compared.GetValue() > CompareTo.GetValue(); case CompareType.LOWER_OR_EQUALS: return Compared.GetValue() <= CompareTo.GetValue(); case CompareType.GREATER_OR_EQUALS: return Compared.GetValue() >= CompareTo.GetValue(); case CompareType.BETWEEN: return Compared.GetValue() >= CompareTo.GetValue() && Compared.GetValue() <= max; } return false; }
public override void AppendCompareTo(ILProcessor ilProcessor, ParameterDefinition parameterDefinition) { ilProcessor.Append(Instruction.Create(OpCodes.Ldarg_0)); ilProcessor.Append(Instruction.Create(OpCodes.Call, _thisProperty.GetMethod.GetGenericMethodReference())); if (_thisProperty.PropertyType.IsGeneric() || MemberTypeDefinition.IsStruct) { ilProcessor.Append(Instruction.Create(OpCodes.Stloc_S, LocalVariable)); ilProcessor.Append(Instruction.Create(OpCodes.Ldloca_S, LocalVariable)); } if (_thisProperty.DeclaringType.IsStruct()) { ilProcessor.Append(Instruction.Create(OpCodes.Ldarga_S, parameterDefinition)); ilProcessor.Append(Instruction.Create(OpCodes.Call, _thisProperty.GetMethod.GetGenericMethodReference())); } else { ilProcessor.Append(Instruction.Create(OpCodes.Ldarg_1)); ilProcessor.Append(Instruction.Create(OpCodes.Callvirt, _thisProperty.GetMethod.GetGenericMethodReference())); } if (MemberTypeDefinition.IsStruct && CompareTo.ByObject()) { ilProcessor.Append(MemberTypeDefinition.Box()); } if (_thisProperty.PropertyType.IsGeneric()) { ilProcessor.Append(MemberTypeDefinition.Box()); ilProcessor.Append(MemberTypeDefinition.Constrained()); } ilProcessor.Append(MemberTypeDefinition.IsStruct ? Instruction.Create(OpCodes.Call, CompareTo) : Instruction.Create(OpCodes.Callvirt, CompareTo)); }
//Notes for graph /* public override string GetViewByColumnName() * { * //There is no RaceShortLabel column in this page, so we need to use the Full paramName * if (ViewBy.Key == GroupKeys.Race) * { * return "RaceLabel"; * } * else * { * return base.GetViewByColumnName(); * } * }*/ //Notes for graph /* public override string GetCompareToColumnName() * { * if (CompareTo == CompareToEnum.DISTSTATE) * { * return "District paramName"; * } * else * { * return base.GetCompareToColumnName(); * } * }*/ private List <string> MyGetFullKeysList( CompareTo compareTo, OrgLevel orgLevel, string origFullKey, List <string> compareToSchoolsOrDistrict) { List <string> retval = new List <string>(); if (OrgLevel.Key == OrgLevelKeys.School) { newOrigFullKey = FullKeyUtils.DistrictFullKey(origFullKey); newOrgLevel.Value = newOrgLevel.Range[OrgLevelKeys.District]; //convert each school into a district fullkey foreach (string fullkey in compareToSchoolsOrDistrict) { string maskedFullkey = FullKeyUtils.GetMaskedFullkey(fullkey, OrgLevelKeys.District); newCompareToSchools.Add(maskedFullkey); } } if (orgLevel.Key == OrgLevelKeys.District) { newOrgLevel = orgLevel; newOrigFullKey = origFullKey; newCompareToSchools = compareToSchoolsOrDistrict; } else if (orgLevel.Key == OrgLevelKeys.State) { newOrgLevel = orgLevel; newOrigFullKey = FullKeyUtils.StateFullKey(origFullKey); } retval = FullKeyUtils.GetFullKeysList(compareTo, newOrgLevel, newOrigFullKey, newCompareToSchools, S4orALL); return(retval); }
private static IList <IBook> SortAuthorMergeHelper(IList <IBook> leftPart, IList <IBook> rightPart, string order) { CompareTo <string, string> comparer = null; comparer = order == "asc" ? comparer += CompareStringAsc : comparer += CompareStringDesc; IList <IBook> result = new List <IBook>(); while (leftPart.Count > 0 || rightPart.Count > 0) { if (leftPart.Count > 0 && rightPart.Count > 0) { if (comparer(rightPart.First().Author.Name, leftPart.First().Author.Name)) { result.Add(leftPart.First()); leftPart.Remove(leftPart.First()); } else { result.Add(rightPart.First()); rightPart.Remove(rightPart.First()); } } else if (leftPart.Count > 0) { result.Add(leftPart.First()); leftPart.Remove(leftPart.First()); } else if (rightPart.Count > 0) { result.Add(rightPart.First()); rightPart.Remove(rightPart.First()); } } return(result); }
private static IList <IBook> SortYearMergeHelper(IList <IBook> leftPart, IList <IBook> rightPart, string order) { CompareTo <int, int> comparer = null; comparer = order == "asc" ? comparer += CompareIntAsc : comparer += CompareIntDesc; IList <IBook> result = new List <IBook>(); while (leftPart.Count > 0 || rightPart.Count > 0) { if (leftPart.Count > 0 && rightPart.Count > 0) { if (comparer(rightPart.First().YearPublished, leftPart.First().YearPublished)) { result.Add(leftPart.First()); leftPart.Remove(leftPart.First()); } else { result.Add(rightPart.First()); rightPart.Remove(rightPart.First()); } } else if (leftPart.Count > 0) { result.Add(leftPart.First()); leftPart.Remove(leftPart.First()); } else if (rightPart.Count > 0) { result.Add(rightPart.First()); rightPart.Remove(rightPart.First()); } } return(result); }
public AVL(CompareTo <T> compare) { root = null; this.compare = compare; }
protected List <string> GetOrderByList(DataTable dt, CompareTo compareTo, string origFullKey) { List <string> retval = new List <string>(); return(retval); }
public AVL(CompareTo <T> compare) { root = null; this.Comparador = compare; }
public CompareToAttribute(CompareTo comparer, string otherProperty) { this.comparer = comparer; this.otherProperty = otherProperty; ErrorMessage ??= GetDefaultErrorMessage(); }
public Comparer(CompareTo rawComp) { this.RawCompareTo = rawComp; }
public Statement(Signal signal, double compareValue) { _signal = signal; _compareVariable = compareValue; _compareTo = CompareTo.StaticVariable; }
public static List <string> GetVisibleColumns(Group viewBy, OrgLevel orgLevel, CompareTo compareTo, STYP schoolType) { ////Notes for graph : Can't reuse this function in graph, because the visible column is used in the Grade Display(Grade Column paramName) //the grap need the Data Set Column paramName, there is a little difference betwen theem. So can't reuse it in graph List <string> retval = new List <string>(); Dictionary <String, String> map = new Dictionary <string, string>(); map.Add(GroupKeys.Race, CommonNames.RaceLabel.ToString()); map.Add(GroupKeys.Gender, CommonNames.SexLabel.ToString()); map.Add(GroupKeys.Grade, CommonNames.GradeLabel.ToString()); map.Add(GroupKeys.Disability, CommonNames.DisabilityLabel.ToString()); map.Add(GroupKeys.EconDisadv, CommonNames.EconDisadvLabel.ToString()); map.Add(GroupKeys.EngLangProf, CommonNames.ELPLabel.ToString()); //not all values result in adding a column if (map.ContainsKey(viewBy.Key)) { retval.Add(map[viewBy.Key]); } if (viewBy.Key == GroupKeys.RaceGender) { retval.Add(CommonNames.RaceLabel.ToString()); retval.Add(CommonNames.SexLabel.ToString()); } //Note that when "OrgLevel <> SC" and "Schooltype = 1 (all types)", we add //another column, SchooltypeLabel, to label the schooltype itemization... if ((orgLevel.Key != OrgLevelKeys.School) && (schoolType.Key == STYPKeys.AllTypes)) { retval.Add(CommonNames.SchooltypeLabel.ToString()); } if (compareTo.Key == CompareToKeys.OrgLevel) { if (orgLevel.Key != OrgLevelKeys.School && schoolType.Key == STYPKeys.AllTypes) { retval.Add(CommonNames.OrgLevelLabel.ToString()); } else { retval.Add(CommonNames.OrgSchoolTypeLabel.ToString()); } } if ((compareTo.Key == CompareToKeys.SelSchools || compareTo.Key == CompareToKeys.SelDistricts) || (compareTo.Key == CompareToKeys.Current)) { //When user selects "Compare To = Selected Schools" the first column in the grid //should show the school name, but with no header. retval.Add(CommonNames.LinkedName.ToString()); } //only show Year column when CompareToEnum == Prior Years if (compareTo.Key == CompareToKeys.Years) { retval.Add(CommonNames.YearFormatted.ToString()); } return(retval); }
static WmiNetUtilsHelper() { myDllPath = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() + "\\wminet_utils.dll"; IntPtr procAddr = IntPtr.Zero; IntPtr loadLibrary = IntPtr.Zero; loadLibrary = LoadLibrary(myDllPath); if( loadLibrary != IntPtr.Zero) { procAddr = GetProcAddress(loadLibrary, "ResetSecurity"); if( procAddr != IntPtr.Zero) { ResetSecurity_f =(ResetSecurity) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(ResetSecurity)); } procAddr = GetProcAddress(loadLibrary, "SetSecurity"); if( procAddr != IntPtr.Zero) { SetSecurity_f =(SetSecurity) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(SetSecurity)); } procAddr = GetProcAddress(loadLibrary, "BlessIWbemServices"); if( procAddr != IntPtr.Zero) { BlessIWbemServices_f =(BlessIWbemServices) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(BlessIWbemServices)); } procAddr = GetProcAddress(loadLibrary, "BlessIWbemServicesObject"); if( procAddr != IntPtr.Zero) { BlessIWbemServicesObject_f =(BlessIWbemServicesObject) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(BlessIWbemServicesObject)); } procAddr = GetProcAddress(loadLibrary, "GetPropertyHandle"); if( procAddr != IntPtr.Zero) { GetPropertyHandle_f27=(GetPropertyHandle) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(GetPropertyHandle)); } procAddr = GetProcAddress(loadLibrary, "WritePropertyValue"); if( procAddr != IntPtr.Zero) { WritePropertyValue_f28=(WritePropertyValue) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(WritePropertyValue)); } procAddr = GetProcAddress(loadLibrary, "Clone"); if( procAddr != IntPtr.Zero) { Clone_f12=(Clone) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(Clone)); } procAddr = GetProcAddress(loadLibrary, "VerifyClientKey"); if( procAddr != IntPtr.Zero) { VerifyClientKey_f =(VerifyClientKey) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(VerifyClientKey)); } procAddr = GetProcAddress(loadLibrary, "GetQualifierSet"); if( procAddr != IntPtr.Zero) { GetQualifierSet_f =(GetQualifierSet) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(GetQualifierSet)); } procAddr = GetProcAddress(loadLibrary, "Get"); if( procAddr != IntPtr.Zero) { Get_f =(Get) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(Get)); } procAddr = GetProcAddress(loadLibrary, "Put"); if( procAddr != IntPtr.Zero) { Put_f =(Put) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(Put)); } procAddr = GetProcAddress(loadLibrary, "Delete"); if( procAddr != IntPtr.Zero) { Delete_f =(Delete) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(Delete)); } procAddr = GetProcAddress(loadLibrary, "GetNames"); if( procAddr != IntPtr.Zero) { GetNames_f =(GetNames) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(GetNames)); } procAddr = GetProcAddress(loadLibrary, "BeginEnumeration"); if( procAddr != IntPtr.Zero) { BeginEnumeration_f =(BeginEnumeration) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(BeginEnumeration)); } procAddr = GetProcAddress(loadLibrary, "Next"); if( procAddr != IntPtr.Zero) { Next_f =(Next) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(Next)); } procAddr = GetProcAddress(loadLibrary, "EndEnumeration"); if( procAddr != IntPtr.Zero) { EndEnumeration_f =(EndEnumeration) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(EndEnumeration)); } procAddr = GetProcAddress(loadLibrary, "GetPropertyQualifierSet"); if( procAddr != IntPtr.Zero) { GetPropertyQualifierSet_f =(GetPropertyQualifierSet) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(GetPropertyQualifierSet)); } procAddr = GetProcAddress(loadLibrary, "Clone"); if( procAddr != IntPtr.Zero) { Clone_f =(Clone) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(Clone)); } procAddr = GetProcAddress(loadLibrary, "GetObjectText"); if( procAddr != IntPtr.Zero) { GetObjectText_f =(GetObjectText) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(GetObjectText)); } procAddr = GetProcAddress(loadLibrary, "SpawnDerivedClass"); if( procAddr != IntPtr.Zero) { SpawnDerivedClass_f =(SpawnDerivedClass) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(SpawnDerivedClass)); } procAddr = GetProcAddress(loadLibrary, "SpawnInstance"); if( procAddr != IntPtr.Zero) { SpawnInstance_f =(SpawnInstance) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(SpawnInstance)); } procAddr = GetProcAddress(loadLibrary, "CompareTo"); if( procAddr != IntPtr.Zero) { CompareTo_f =(CompareTo) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(CompareTo)); } procAddr = GetProcAddress(loadLibrary, "GetPropertyOrigin"); if( procAddr != IntPtr.Zero) { GetPropertyOrigin_f =(GetPropertyOrigin) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(GetPropertyOrigin)); } procAddr = GetProcAddress(loadLibrary, "InheritsFrom"); if( procAddr != IntPtr.Zero) { InheritsFrom_f =(InheritsFrom) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(InheritsFrom)); } procAddr = GetProcAddress(loadLibrary, "GetMethod"); if( procAddr != IntPtr.Zero) { GetMethod_f =(GetMethod) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(GetMethod)); } procAddr = GetProcAddress(loadLibrary, "PutMethod"); if( procAddr != IntPtr.Zero) { PutMethod_f =(PutMethod) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(PutMethod)); } procAddr = GetProcAddress(loadLibrary, "DeleteMethod"); if( procAddr != IntPtr.Zero) { DeleteMethod_f =(DeleteMethod) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(DeleteMethod)); } procAddr = GetProcAddress(loadLibrary, "BeginMethodEnumeration"); if( procAddr != IntPtr.Zero) { BeginMethodEnumeration_f =(BeginMethodEnumeration) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(BeginMethodEnumeration)); } procAddr = GetProcAddress(loadLibrary, "NextMethod"); if( procAddr != IntPtr.Zero) { NextMethod_f =(NextMethod) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(NextMethod)); } procAddr = GetProcAddress(loadLibrary, "EndMethodEnumeration"); if( procAddr != IntPtr.Zero) { EndMethodEnumeration_f =(EndMethodEnumeration) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(EndMethodEnumeration)); } procAddr = GetProcAddress(loadLibrary, "GetMethodQualifierSet"); if( procAddr != IntPtr.Zero) { GetMethodQualifierSet_f =(GetMethodQualifierSet) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(GetMethodQualifierSet)); } procAddr = GetProcAddress(loadLibrary, "GetMethodOrigin"); if( procAddr != IntPtr.Zero) { GetMethodOrigin_f =(GetMethodOrigin) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(GetMethodOrigin)); } procAddr = GetProcAddress(loadLibrary, "QualifierSet_Get"); if( procAddr != IntPtr.Zero) { QualifierGet_f=(QualifierSet_Get) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(QualifierSet_Get)); } procAddr = GetProcAddress(loadLibrary, "QualifierSet_Put"); if( procAddr != IntPtr.Zero) { QualifierPut_f=(QualifierSet_Put) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(QualifierSet_Put)); } procAddr = GetProcAddress(loadLibrary, "QualifierSet_Delete"); if( procAddr != IntPtr.Zero) { QualifierDelete_f=(QualifierSet_Delete) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(QualifierSet_Delete)); } procAddr = GetProcAddress(loadLibrary, "QualifierSet_GetNames"); if( procAddr != IntPtr.Zero) { QualifierGetNames_f=(QualifierSet_GetNames) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(QualifierSet_GetNames)); } procAddr = GetProcAddress(loadLibrary, "QualifierSet_BeginEnumeration"); if( procAddr != IntPtr.Zero) { QualifierBeginEnumeration_f=(QualifierSet_BeginEnumeration) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(QualifierSet_BeginEnumeration)); } procAddr = GetProcAddress(loadLibrary, "QualifierSet_Next"); if( procAddr != IntPtr.Zero) { QualifierNext_f=(QualifierSet_Next) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(QualifierSet_Next)); } procAddr = GetProcAddress(loadLibrary, "QualifierSet_EndEnumeration"); if( procAddr != IntPtr.Zero) { QualifierEndEnumeration_f=(QualifierSet_EndEnumeration) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(QualifierSet_EndEnumeration)); } procAddr = GetProcAddress(loadLibrary, "GetCurrentApartmentType"); if( procAddr != IntPtr.Zero) { GetCurrentApartmentType_f =(GetCurrentApartmentType) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(GetCurrentApartmentType)); } procAddr = GetProcAddress(loadLibrary, "GetDemultiplexedStub"); if( procAddr != IntPtr.Zero) { GetDemultiplexedStub_f =(GetDemultiplexedStub) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(GetDemultiplexedStub)); } procAddr = GetProcAddress(loadLibrary, "CreateInstanceEnumWmi"); if( procAddr != IntPtr.Zero) { CreateInstanceEnumWmi_f =(CreateInstanceEnumWmi) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(CreateInstanceEnumWmi)); } procAddr = GetProcAddress(loadLibrary, "CreateClassEnumWmi"); if( procAddr != IntPtr.Zero) { CreateClassEnumWmi_f =(CreateClassEnumWmi) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(CreateClassEnumWmi)); } procAddr = GetProcAddress(loadLibrary, "ExecQueryWmi"); if( procAddr != IntPtr.Zero) { ExecQueryWmi_f =(ExecQueryWmi) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(ExecQueryWmi)); } procAddr = GetProcAddress(loadLibrary, "ExecNotificationQueryWmi"); if( procAddr != IntPtr.Zero) { ExecNotificationQueryWmi_f =(ExecNotificationQueryWmi) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(ExecNotificationQueryWmi)); } procAddr = GetProcAddress(loadLibrary, "PutInstanceWmi"); if( procAddr != IntPtr.Zero) { PutInstanceWmi_f =(PutInstanceWmi) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(PutInstanceWmi)); } procAddr = GetProcAddress(loadLibrary, "PutClassWmi"); if( procAddr != IntPtr.Zero) { PutClassWmi_f =(PutClassWmi) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(PutClassWmi)); } procAddr = GetProcAddress(loadLibrary, "CloneEnumWbemClassObject"); if( procAddr != IntPtr.Zero) { CloneEnumWbemClassObject_f =(CloneEnumWbemClassObject) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(CloneEnumWbemClassObject)); } procAddr = GetProcAddress(loadLibrary, "ConnectServerWmi"); if( procAddr != IntPtr.Zero) { ConnectServerWmi_f =(ConnectServerWmi) Marshal.GetDelegateForFunctionPointer(procAddr, typeof(ConnectServerWmi)); } } }
public Statement(Signal signal, Signal compareSignal) { _signal = signal; _compareSignal = compareSignal; _compareTo = CompareTo.SignalValue; }
public override List <string> GetVisibleColumns(Group viewBy, OrgLevel orgLevel, CompareTo compareTo, STYP schoolType) { List <string> cols = base.GetVisibleColumns(viewBy, orgLevel, compareTo, schoolType); if ((compareTo.Key == CompareToKeys.SelSchools) || (compareTo.Key == CompareToKeys.Current)) { //When user selects "Compare To = Selected Schools" the first column in the grid //should show the school name, but with no header. cols.Add(_ds._v_DropoutsWWoDisEconELPSchoolDistState.NameColumn.ColumnName); } cols.Add(_ds._v_DropoutsWWoDisEconELPSchoolDistState.EnrollmentColumn.ColumnName); cols.Add(_ds._v_DropoutsWWoDisEconELPSchoolDistState.Students_expected_to_complete_the_school_termColumn.ColumnName); cols.Add(_ds._v_DropoutsWWoDisEconELPSchoolDistState.Students_who_completed_the_school_termColumn.ColumnName); cols.Add(_ds._v_DropoutsWWoDisEconELPSchoolDistState.Drop_OutsColumn.ColumnName); cols.Add(_ds._v_DropoutsWWoDisEconELPSchoolDistState.Drop_Out_RateColumn.ColumnName); return(cols); }
public Comparer() { this.RawCompareTo = new CompareTo(LexicographicCompareTo); }
static WmiNetUtilsHelper() { IntPtr zero = IntPtr.Zero; IntPtr hModule = IntPtr.Zero; hModule = LoadLibrary(myDllPath); if (hModule != IntPtr.Zero) { zero = GetProcAddress(hModule, "ResetSecurity"); if (zero != IntPtr.Zero) { ResetSecurity_f = (ResetSecurity)Marshal.GetDelegateForFunctionPointer(zero, typeof(ResetSecurity)); } zero = GetProcAddress(hModule, "SetSecurity"); if (zero != IntPtr.Zero) { SetSecurity_f = (SetSecurity)Marshal.GetDelegateForFunctionPointer(zero, typeof(SetSecurity)); } zero = GetProcAddress(hModule, "BlessIWbemServices"); if (zero != IntPtr.Zero) { BlessIWbemServices_f = (BlessIWbemServices)Marshal.GetDelegateForFunctionPointer(zero, typeof(BlessIWbemServices)); } zero = GetProcAddress(hModule, "BlessIWbemServicesObject"); if (zero != IntPtr.Zero) { BlessIWbemServicesObject_f = (BlessIWbemServicesObject)Marshal.GetDelegateForFunctionPointer(zero, typeof(BlessIWbemServicesObject)); } zero = GetProcAddress(hModule, "GetPropertyHandle"); if (zero != IntPtr.Zero) { GetPropertyHandle_f27 = (GetPropertyHandle)Marshal.GetDelegateForFunctionPointer(zero, typeof(GetPropertyHandle)); } zero = GetProcAddress(hModule, "WritePropertyValue"); if (zero != IntPtr.Zero) { WritePropertyValue_f28 = (WritePropertyValue)Marshal.GetDelegateForFunctionPointer(zero, typeof(WritePropertyValue)); } zero = GetProcAddress(hModule, "Clone"); if (zero != IntPtr.Zero) { Clone_f12 = (Clone)Marshal.GetDelegateForFunctionPointer(zero, typeof(Clone)); } zero = GetProcAddress(hModule, "VerifyClientKey"); if (zero != IntPtr.Zero) { VerifyClientKey_f = (VerifyClientKey)Marshal.GetDelegateForFunctionPointer(zero, typeof(VerifyClientKey)); } zero = GetProcAddress(hModule, "GetQualifierSet"); if (zero != IntPtr.Zero) { GetQualifierSet_f = (GetQualifierSet)Marshal.GetDelegateForFunctionPointer(zero, typeof(GetQualifierSet)); } zero = GetProcAddress(hModule, "Get"); if (zero != IntPtr.Zero) { Get_f = (Get)Marshal.GetDelegateForFunctionPointer(zero, typeof(Get)); } zero = GetProcAddress(hModule, "Put"); if (zero != IntPtr.Zero) { Put_f = (Put)Marshal.GetDelegateForFunctionPointer(zero, typeof(Put)); } zero = GetProcAddress(hModule, "Delete"); if (zero != IntPtr.Zero) { Delete_f = (Delete)Marshal.GetDelegateForFunctionPointer(zero, typeof(Delete)); } zero = GetProcAddress(hModule, "GetNames"); if (zero != IntPtr.Zero) { GetNames_f = (GetNames)Marshal.GetDelegateForFunctionPointer(zero, typeof(GetNames)); } zero = GetProcAddress(hModule, "BeginEnumeration"); if (zero != IntPtr.Zero) { BeginEnumeration_f = (BeginEnumeration)Marshal.GetDelegateForFunctionPointer(zero, typeof(BeginEnumeration)); } zero = GetProcAddress(hModule, "Next"); if (zero != IntPtr.Zero) { Next_f = (Next)Marshal.GetDelegateForFunctionPointer(zero, typeof(Next)); } zero = GetProcAddress(hModule, "EndEnumeration"); if (zero != IntPtr.Zero) { EndEnumeration_f = (EndEnumeration)Marshal.GetDelegateForFunctionPointer(zero, typeof(EndEnumeration)); } zero = GetProcAddress(hModule, "GetPropertyQualifierSet"); if (zero != IntPtr.Zero) { GetPropertyQualifierSet_f = (GetPropertyQualifierSet)Marshal.GetDelegateForFunctionPointer(zero, typeof(GetPropertyQualifierSet)); } zero = GetProcAddress(hModule, "Clone"); if (zero != IntPtr.Zero) { Clone_f = (Clone)Marshal.GetDelegateForFunctionPointer(zero, typeof(Clone)); } zero = GetProcAddress(hModule, "GetObjectText"); if (zero != IntPtr.Zero) { GetObjectText_f = (GetObjectText)Marshal.GetDelegateForFunctionPointer(zero, typeof(GetObjectText)); } zero = GetProcAddress(hModule, "SpawnDerivedClass"); if (zero != IntPtr.Zero) { SpawnDerivedClass_f = (SpawnDerivedClass)Marshal.GetDelegateForFunctionPointer(zero, typeof(SpawnDerivedClass)); } zero = GetProcAddress(hModule, "SpawnInstance"); if (zero != IntPtr.Zero) { SpawnInstance_f = (SpawnInstance)Marshal.GetDelegateForFunctionPointer(zero, typeof(SpawnInstance)); } zero = GetProcAddress(hModule, "CompareTo"); if (zero != IntPtr.Zero) { CompareTo_f = (CompareTo)Marshal.GetDelegateForFunctionPointer(zero, typeof(CompareTo)); } zero = GetProcAddress(hModule, "GetPropertyOrigin"); if (zero != IntPtr.Zero) { GetPropertyOrigin_f = (GetPropertyOrigin)Marshal.GetDelegateForFunctionPointer(zero, typeof(GetPropertyOrigin)); } zero = GetProcAddress(hModule, "InheritsFrom"); if (zero != IntPtr.Zero) { InheritsFrom_f = (InheritsFrom)Marshal.GetDelegateForFunctionPointer(zero, typeof(InheritsFrom)); } zero = GetProcAddress(hModule, "GetMethod"); if (zero != IntPtr.Zero) { GetMethod_f = (GetMethod)Marshal.GetDelegateForFunctionPointer(zero, typeof(GetMethod)); } zero = GetProcAddress(hModule, "PutMethod"); if (zero != IntPtr.Zero) { PutMethod_f = (PutMethod)Marshal.GetDelegateForFunctionPointer(zero, typeof(PutMethod)); } zero = GetProcAddress(hModule, "DeleteMethod"); if (zero != IntPtr.Zero) { DeleteMethod_f = (DeleteMethod)Marshal.GetDelegateForFunctionPointer(zero, typeof(DeleteMethod)); } zero = GetProcAddress(hModule, "BeginMethodEnumeration"); if (zero != IntPtr.Zero) { BeginMethodEnumeration_f = (BeginMethodEnumeration)Marshal.GetDelegateForFunctionPointer(zero, typeof(BeginMethodEnumeration)); } zero = GetProcAddress(hModule, "NextMethod"); if (zero != IntPtr.Zero) { NextMethod_f = (NextMethod)Marshal.GetDelegateForFunctionPointer(zero, typeof(NextMethod)); } zero = GetProcAddress(hModule, "EndMethodEnumeration"); if (zero != IntPtr.Zero) { EndMethodEnumeration_f = (EndMethodEnumeration)Marshal.GetDelegateForFunctionPointer(zero, typeof(EndMethodEnumeration)); } zero = GetProcAddress(hModule, "GetMethodQualifierSet"); if (zero != IntPtr.Zero) { GetMethodQualifierSet_f = (GetMethodQualifierSet)Marshal.GetDelegateForFunctionPointer(zero, typeof(GetMethodQualifierSet)); } zero = GetProcAddress(hModule, "GetMethodOrigin"); if (zero != IntPtr.Zero) { GetMethodOrigin_f = (GetMethodOrigin)Marshal.GetDelegateForFunctionPointer(zero, typeof(GetMethodOrigin)); } zero = GetProcAddress(hModule, "QualifierSet_Get"); if (zero != IntPtr.Zero) { QualifierGet_f = (QualifierSet_Get)Marshal.GetDelegateForFunctionPointer(zero, typeof(QualifierSet_Get)); } zero = GetProcAddress(hModule, "QualifierSet_Put"); if (zero != IntPtr.Zero) { QualifierPut_f = (QualifierSet_Put)Marshal.GetDelegateForFunctionPointer(zero, typeof(QualifierSet_Put)); } zero = GetProcAddress(hModule, "QualifierSet_Delete"); if (zero != IntPtr.Zero) { QualifierDelete_f = (QualifierSet_Delete)Marshal.GetDelegateForFunctionPointer(zero, typeof(QualifierSet_Delete)); } zero = GetProcAddress(hModule, "QualifierSet_GetNames"); if (zero != IntPtr.Zero) { QualifierGetNames_f = (QualifierSet_GetNames)Marshal.GetDelegateForFunctionPointer(zero, typeof(QualifierSet_GetNames)); } zero = GetProcAddress(hModule, "QualifierSet_BeginEnumeration"); if (zero != IntPtr.Zero) { QualifierBeginEnumeration_f = (QualifierSet_BeginEnumeration)Marshal.GetDelegateForFunctionPointer(zero, typeof(QualifierSet_BeginEnumeration)); } zero = GetProcAddress(hModule, "QualifierSet_Next"); if (zero != IntPtr.Zero) { QualifierNext_f = (QualifierSet_Next)Marshal.GetDelegateForFunctionPointer(zero, typeof(QualifierSet_Next)); } zero = GetProcAddress(hModule, "QualifierSet_EndEnumeration"); if (zero != IntPtr.Zero) { QualifierEndEnumeration_f = (QualifierSet_EndEnumeration)Marshal.GetDelegateForFunctionPointer(zero, typeof(QualifierSet_EndEnumeration)); } zero = GetProcAddress(hModule, "GetCurrentApartmentType"); if (zero != IntPtr.Zero) { GetCurrentApartmentType_f = (GetCurrentApartmentType)Marshal.GetDelegateForFunctionPointer(zero, typeof(GetCurrentApartmentType)); } zero = GetProcAddress(hModule, "GetDemultiplexedStub"); if (zero != IntPtr.Zero) { GetDemultiplexedStub_f = (GetDemultiplexedStub)Marshal.GetDelegateForFunctionPointer(zero, typeof(GetDemultiplexedStub)); } zero = GetProcAddress(hModule, "CreateInstanceEnumWmi"); if (zero != IntPtr.Zero) { CreateInstanceEnumWmi_f = (CreateInstanceEnumWmi)Marshal.GetDelegateForFunctionPointer(zero, typeof(CreateInstanceEnumWmi)); } zero = GetProcAddress(hModule, "CreateClassEnumWmi"); if (zero != IntPtr.Zero) { CreateClassEnumWmi_f = (CreateClassEnumWmi)Marshal.GetDelegateForFunctionPointer(zero, typeof(CreateClassEnumWmi)); } zero = GetProcAddress(hModule, "ExecQueryWmi"); if (zero != IntPtr.Zero) { ExecQueryWmi_f = (ExecQueryWmi)Marshal.GetDelegateForFunctionPointer(zero, typeof(ExecQueryWmi)); } zero = GetProcAddress(hModule, "ExecNotificationQueryWmi"); if (zero != IntPtr.Zero) { ExecNotificationQueryWmi_f = (ExecNotificationQueryWmi)Marshal.GetDelegateForFunctionPointer(zero, typeof(ExecNotificationQueryWmi)); } zero = GetProcAddress(hModule, "PutInstanceWmi"); if (zero != IntPtr.Zero) { PutInstanceWmi_f = (PutInstanceWmi)Marshal.GetDelegateForFunctionPointer(zero, typeof(PutInstanceWmi)); } zero = GetProcAddress(hModule, "PutClassWmi"); if (zero != IntPtr.Zero) { PutClassWmi_f = (PutClassWmi)Marshal.GetDelegateForFunctionPointer(zero, typeof(PutClassWmi)); } zero = GetProcAddress(hModule, "CloneEnumWbemClassObject"); if (zero != IntPtr.Zero) { CloneEnumWbemClassObject_f = (CloneEnumWbemClassObject)Marshal.GetDelegateForFunctionPointer(zero, typeof(CloneEnumWbemClassObject)); } zero = GetProcAddress(hModule, "ConnectServerWmi"); if (zero != IntPtr.Zero) { ConnectServerWmi_f = (ConnectServerWmi)Marshal.GetDelegateForFunctionPointer(zero, typeof(ConnectServerWmi)); } } }