154 references to GetValue
Aspire.Hosting.Tests (3)
ResourceNotificationTests.cs (3)
2211.Single(index => Equals(values.GetValue(index), currentValue)); 2212return values.GetValue((currentIndex + 1) % values.Length); 2268return Enum.GetValues(type).GetValue(0)
dotnet-svcutil-lib (14)
FrameworkFork\Microsoft.Xml\Xml\schema\ConstraintStruct.cs (7)
289_dstruct.Dvalue[i] = Convert.ToDecimal(((Array)_ovalue).GetValue(i), NumberFormatInfo.InvariantInfo); 362return atomicValues1.Length == 1 && atomicValues1.GetValue(0).Equals(other.Value); 366return arr1.Length == 1 && arr1.GetValue(0).Equals(other.Value); 376return atomicValues2.Length == 1 && atomicValues2.GetValue(0).Equals(this.Value); 380return arr2.Length == 1 && arr2.GetValue(0).Equals(this.Value); 479_hashcode += ((XmlAtomicValue)atomicValues.GetValue(j)).TypedValue.GetHashCode(); 486_hashcode += ((Array)_ks[i].Value).GetValue(j).GetHashCode();
FrameworkFork\Microsoft.Xml\Xml\schema\DatatypeImplementation.cs (3)
1013if (_itemType.Compare(arr1.GetValue(i), arr2.GetValue(i)) != 0) 1075item = valuesToCheck.GetValue(i);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationReader.cs (1)
1824object currItem = array.GetValue(i);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (1)
1312WritePotentiallyReferencingElement("Item", "", a.GetValue(i), elementType, false, true);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseWriter.cs (1)
1579WritePrimitiveValue(array.GetValue(i));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\XmlSerializerOperationFormatter.cs (1)
498messageHeaderOfTArray[i] = TypedHeaderManager.Create(headerDescription.Type, headerValues.GetValue(i),
Microsoft.AspNetCore.Components (1)
BindConverter.cs (1)
2109if (!elementParser(initialArray.GetValue(i), culture, out convertedArray[i]!))
Microsoft.AspNetCore.Components.Forms (1)
FieldIdentifier.cs (1)
255((Array)GetModelFromExpression(arrayIndex.Left)).GetValue(
Microsoft.AspNetCore.Mvc.Core (2)
ModelBinding\ModelBindingHelper.cs (2)
643converted[i] = ConvertSimpleType(valueAsArray.GetValue(i), destinationElementType, culture); 662var elementValue = valueAsArray.GetValue(0);
Microsoft.Build (3)
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (2)
1142result[i] = (ITaskItem)taskItemArray.GetValue(i); 1168object output = convertibleOutputs.GetValue(i);
Expansion\PropertyValueConverter.cs (1)
114AppendElement(array.GetValue(lowerBound + i));
Microsoft.Build.Framework (2)
BackEnd\TaskParameter.cs (2)
455string valueString = Convert.ToString(array.GetValue(i), CultureInfo.InvariantCulture); 544object value = array.GetValue(i);
Microsoft.DotNet.Build.Tasks.Installers (5)
src\RpmHeader.cs (5)
316storeStream.WriteByte((byte)(char)contents.GetValue(i)!); 319storeStream.WriteByte((byte)contents.GetValue(i)!); 322BinaryPrimitives.WriteInt16BigEndian(tempBeBytes, (short)contents.GetValue(i)!); 326BinaryPrimitives.WriteInt32BigEndian(tempBeBytes, (int)contents.GetValue(i)!); 330BinaryPrimitives.WriteInt64BigEndian(tempBeBytes, (long)contents.GetValue(i)!);
Microsoft.ML.Data (1)
EntryPoints\EntryPointNode.cs (1)
1185return arr?.GetValue(Index);
Microsoft.ML.FastTree (2)
Dataset\Dataset.cs (2)
412qdd.Data.SetValue(Data.GetValue(docArray[i]), i); 685newData.SetValue(qddata.Data.GetValue(mapping[i]), i);
Microsoft.ML.Tests (2)
CollectionsDataViewTest.cs (2)
101if (!CompareObjectValues(x.GetValue(i), y.GetValue(i), x.GetType().GetElementType()))
Microsoft.TestPlatform.Utilities (1)
CodeCoverageDataAttachmentsHandler.cs (1)
132var mergeResult = s_mergeMethodInfo.Invoke(s_classInstance, [files[0], files, s_mergeOperationEnumValues.GetValue(0)!, true, cancellationToken]);
MSBuild (1)
OutOfProcTaskAppDomainWrapperBase.cs (1)
515convertedArray.SetValue(ConvertTaskParameterValue(sourceArray.GetValue(i), elementType), i);
PresentationCore (3)
MS\Internal\Ink\ExtendedProperty.cs (2)
67if (!array1.GetValue(i).Equals(array2.GetValue(i)))
System\Windows\Media\Imaging\WriteableBitmap.cs (1)
1092object exemplar = sourceBuffer.GetValue(0);
System.ComponentModel.TypeConverter (5)
System\ComponentModel\ArrayConverter.cs (1)
77return array.GetValue(_index);
System\ComponentModel\EnumConverter.cs (1)
185ulValues[idx] = GetEnumValue(isUnderlyingTypeUInt64, objValues.GetValue(idx)!, culture);
System\ComponentModel\EventDescriptorCollection.cs (1)
454return _array!.GetValue(_current);
System\ComponentModel\TypeConverter.cs (2)
468return _valueArray.GetValue(index); 478return _valueArray.GetValue(index);
System.Data.Common (5)
System\Data\Common\ObjectStorage.cs (2)
162int c = CompareTo(arr1.GetValue(i), arr2.GetValue(i));
System\Data\DataRowComparer.cs (3)
86if (!AreElementEqual(a.GetValue(index1), b.GetValue(index2))) 203hash = array.GetValue(array.GetLowerBound(0))!.GetHashCode();
System.Linq.Expressions (1)
System\Linq\Expressions\Interpreter\ArrayOperations.cs (1)
112frame.Push(array.GetValue(index));
System.Management (27)
System\Management\Property.cs (22)
292((ushort[])val)[i] = (ushort)((int)(wmiValueArray.GetValue(i))); 299((uint[])val)[i] = (uint)((int)(wmiValueArray.GetValue(i))); 306((ulong[])val)[i] = Convert.ToUInt64((string)(wmiValueArray.GetValue(i)), (IFormatProvider)CultureInfo.CurrentCulture.GetFormat(typeof(ulong))); 313((sbyte[])val)[i] = (sbyte)((short)(wmiValueArray.GetValue(i))); 320((long[])val)[i] = Convert.ToInt64((string)(wmiValueArray.GetValue(i)), (IFormatProvider)CultureInfo.CurrentCulture.GetFormat(typeof(long))); 327((char[])val)[i] = (char)((short)(wmiValueArray.GetValue(i))); 334((ManagementBaseObject[])val)[i] = new ManagementBaseObject(new IWbemClassObjectFreeThreaded(Marshal.GetIUnknownForObject(wmiValueArray.GetValue(i)))); 383((short[])(wmiValue))[i] = (short)Convert.ToSByte(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(sbyte))); 393((byte[])wmiValue)[i] = Convert.ToByte(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(byte))); 404((short[])(wmiValue))[i] = Convert.ToInt16(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(short))); 411((int[])(wmiValue))[i] = (int)(Convert.ToUInt16(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(ushort)))); 421((int[])(wmiValue))[i] = Convert.ToInt32(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(int))); 428((int[])(wmiValue))[i] = (int)(Convert.ToUInt32(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(uint)))); 434((string[])(wmiValue))[i] = (Convert.ToInt64(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(long)))).ToString((IFormatProvider)culInfo.GetFormat(typeof(long))); 440((string[])(wmiValue))[i] = (Convert.ToUInt64(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(ulong)))).ToString((IFormatProvider)culInfo.GetFormat(typeof(ulong))); 450((float[])(wmiValue))[i] = Convert.ToSingle(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(float))); 461((double[])(wmiValue))[i] = Convert.ToDouble(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(double))); 468((short[])(wmiValue))[i] = (short)Convert.ToChar(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(char))); 480((string[])(wmiValue))[i] = (valArray.GetValue(i)).ToString(); 491((bool[])(wmiValue))[i] = Convert.ToBoolean(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(bool))); 500((IWbemClassObject_DoNotMarshal[])(wmiValue))[i] = (IWbemClassObject_DoNotMarshal)(Marshal.GetObjectForIUnknown(((ManagementBaseObject)valArray.GetValue(i)).wbemObject)); 723((IWbemClassObject_DoNotMarshal[])(wmiValue))[i] = (IWbemClassObject_DoNotMarshal)(Marshal.GetObjectForIUnknown(((ManagementBaseObject)valArray.GetValue(i)).wbemObject));
System\Management\Qualifier.cs (5)
105Type elementType = (length > 0 ? valArray.GetValue(0).GetType() : null); 111((int[])(wmiValue))[i] = Convert.ToInt32(valArray.GetValue(i), (IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(int))); 117((double[])(wmiValue))[i] = Convert.ToDouble(valArray.GetValue(i), (IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(double))); 123((string[])(wmiValue))[i] = (valArray.GetValue(i)).ToString(); 129((bool[])(wmiValue))[i] = Convert.ToBoolean(valArray.GetValue(i), (IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(bool)));
System.Private.CoreLib (42)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Array.cs (37)
924return this.GetValue(iindex); 1071get => GetValue(index); 1138object? left = GetValue(i); 1139object? right = o.GetValue(i); 1168object? left = GetValue(i); 1169object? right = o.GetValue(i); 1190hashCode.Add(comparer.GetHashCode(GetValue(i)!)); 1392c = comparer.Compare(array.GetValue(i), value); 1894object? obj = array.GetValue(i); 2121object? obj = array.GetValue(i); 2320object? temp = array.GetValue(i); 2321array.SetValue(array.GetValue(j), i); 2912if (comparer.Compare(keys.GetValue(a), keys.GetValue(b)) > 0) 2914object? key = keys.GetValue(a); 2915keys.SetValue(keys.GetValue(b), a); 2919object? item = items.GetValue(a); 2920items.SetValue(items.GetValue(b), a); 2929object? t1 = keys.GetValue(i); 2930keys.SetValue(keys.GetValue(j), i); 2935object? t2 = items.GetValue(i); 2936items.SetValue(items.GetValue(j), i); 3022object? pivot = keys.GetValue(mid); 3028while (comparer.Compare(keys.GetValue(++left), pivot) < 0) ; 3029while (comparer.Compare(pivot, keys.GetValue(--right)) < 0) ; 3062object? d = keys.GetValue(lo + i - 1); 3063object? dt = items?.GetValue(lo + i - 1); 3068if (child < n && comparer.Compare(keys.GetValue(lo + child - 1), keys.GetValue(lo + child)) < 0) 3073if (!(comparer.Compare(d, keys.GetValue(lo + child - 1)) < 0)) 3076keys.SetValue(keys.GetValue(lo + child - 1), lo + i - 1); 3077items?.SetValue(items.GetValue(lo + child - 1), lo + i - 1); 3092t = keys.GetValue(i + 1); 3093dt = items?.GetValue(i + 1); 3095while (j >= lo && comparer.Compare(t, keys.GetValue(j)) < 0) 3097keys.SetValue(keys.GetValue(j), j + 1); 3098items?.SetValue(items.GetValue(j), j + 1);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Attribute.cs (2)
120if (!AreFieldValuesEqual(thisValueArray.GetValue(j), thatValueArray.GetValue(j)))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\ArrayTypeInfo.cs (2)
37this.elementInfo.WriteData(elementInfo.PropertyValueFactory(array.GetValue(i))); 51serializedArray[i] = this.elementInfo.GetData(array.GetValue(i));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Type.Enum.cs (1)
160ulArray[i] = Enum.ToUInt64(array.GetValue(i)!);
System.Private.DataContractSerialization (4)
System\Runtime\Serialization\Json\ReflectionJsonFormatWriter.cs (1)
53ReflectionJsonClassWriter.ReflectionWriteValue(jsonWriter, context, itemType, array.GetValue(i), false, primitiveContract);
System\Runtime\Serialization\Json\XmlJsonWriter.cs (1)
1475WritePrimitiveValue(array.GetValue(i)!);
System\Runtime\Serialization\ReflectionXmlFormatWriter.cs (1)
49ReflectionXmlClassWriter.ReflectionWriteValue(xmlWriter, context, itemType, array.GetValue(i), false, primitiveContract);
System\Xml\XmlBaseWriter.cs (1)
1806WritePrimitiveValue(array.GetValue(i)!); // possible bug to log?
System.Private.Xml (16)
System\Xml\Schema\ConstraintStruct.cs (7)
286_dstruct.Dvalue[i] = Convert.ToDecimal(((Array)_ovalue!).GetValue(i), NumberFormatInfo.InvariantInfo); 359return atomicValues1.Length == 1 && atomicValues1.GetValue(0)!.Equals(other.Value); 364return arr1.Length == 1 && arr1.GetValue(0)!.Equals(other.Value); 374return atomicValues2.Length == 1 && atomicValues2.GetValue(0)!.Equals(this.Value); 379return arr2.Length == 1 && arr2.GetValue(0)!.Equals(this.Value); 468_hashcode += ((XmlAtomicValue)atomicValues.GetValue(j)!).TypedValue.GetHashCode(); 475_hashcode += ((Array)_ks[i].Value!).GetValue(j)!.GetHashCode();
System\Xml\Schema\DataTypeImplementation.cs (3)
980if (_itemType.Compare(arr1.GetValue(i)!, arr2.GetValue(i)!) != 0) 1040item = valuesToCheck.GetValue(i)!;
System\Xml\Schema\FacetChecker.cs (2)
1684if (list.ItemType.Compare(values.GetValue(j)!, enumValue.GetValue(0)!) == 0)
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (2)
177object? choiceSource = choiceArray?.GetValue(i); 204object? choiceSource = choiceArray?.GetValue(c++);
System\Xml\Serialization\XmlSerializationReader.cs (1)
1753object? currItem = array!.GetValue(i);
System\Xml\Serialization\XmlSerializationWriter.cs (1)
1324WritePotentiallyReferencingElement("Item", "", a.GetValue(i), elementType, false, true);
System.ServiceModel.Primitives (1)
System\ServiceModel\Dispatcher\XmlSerializerOperationFormatter.cs (1)
603messageHeaderOfTArray[i] = TypedHeaderManager.Create(headerDescription.Type, headerValues.GetValue(i),
System.Windows.Forms (9)
System\Windows\Forms\ActiveX\AxHost.cs (2)
3840o = ((Array)o).GetValue(0)!; 3851o = ((Array)o).GetValue(0)!;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\ArrayElementGridEntry.cs (1)
31return ((Array)owner).GetValue(_index);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MergePropertyDescriptor.cs (1)
182object? propertyOwner = a.GetValue(i);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiPropertyDescriptorGridEntry.cs (3)
242object component = ownerArray.GetValue(i)!; 347if (a1.GetValue(i) != a2.GetValue(i))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (2)
637eventObj = objArray.GetValue(0); 807component = array.GetValue(0) as IComponent;
UIAutomationClient (3)
MS\Internal\Automation\Misc.cs (3)
106if (!a.GetValue(src).Equals(a.GetValue(dest))) 109a.SetValue(a.GetValue(src), dest);