本文整理汇总了C#中System.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# System.GetValue方法的具体用法?C# System.GetValue怎么用?C# System.GetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System
的用法示例。
在下文中一共展示了System.GetValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: APIError
public APIError(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
Error = (string)info.GetValue("error", typeof(string));
HttpStatusCode = (int)info.GetValue("@http_status_code", typeof(int));
Warnings = (List<string>)info.GetValue("warnings", typeof(List<string>));
}
示例2: CryExtInfo
protected CryExtInfo(System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
{
this.Count = info.GetInt32 ("Count");
this.Key = (byte[])info.GetValue ("Key", typeof(byte[]));
this.Salt = (byte[])info.GetValue ("Salt", typeof(byte[]));
}
示例3: ParserStack
ParserStack( System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
{
this.states = (List<int>)info.GetValue("States", typeof(List<int>));
this.States = this.states.AsReadOnly();
this.symbols = (List<Symbol>)info.GetValue("Symbols", typeof(List<Symbol>));
this.Symbols = this.symbols.AsReadOnly();
}
示例4: HandlerNotFoundException
protected HandlerNotFoundException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base (info, context)
{
handler_name = info.GetString ("HandlerName");
signal_name = info.GetString ("SignalName");
evnt = info.GetValue ("Event", typeof (System.Reflection.EventInfo)) as System.Reflection.EventInfo;
delegate_type = info.GetValue ("DelegateType", typeof (Type)) as Type;
}
示例5: IS24Exception
/// <summary>
/// Initializes a new instance of the Exception class with serialized data.
/// </summary>
/// <param name="info">The SerializationInfo that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
protected IS24Exception(
System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
Messages = (Messages)info.GetValue("Messages", typeof(Messages));
StatusCode = (HttpStatusCode)info.GetValue("StatusCode", typeof(HttpStatusCode));
}
示例6: RemoteVolume
public RemoteVolume(System.Data.IDataReader rd)
{
this.ID = Convert.ToInt64(rd.GetValue(0));
this.Name = rd.GetValue(1).ToString();
this.Size = Convert.ToInt64(rd.GetValue(2));
this.Hash = rd.GetValue(3).ToString();
this.VerificationCount = Convert.ToInt64(rd.GetValue(4));
}
示例7: SettingsState
public SettingsState(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext ctxt)
{
this.tidVist = (Decimal)info.GetValue("tidvist", typeof(Decimal));
this.tidFoerFortoning = (Decimal)info.GetValue("tidfoerfortoning", typeof(Decimal)); ;
this.tidFortoning = (Decimal)info.GetValue("tidfortoning", typeof(Decimal)); ;
this.tidVend = (Decimal)info.GetValue("tidvend", typeof(Decimal)); ;
this.screen = (string)info.GetValue("skaerm", typeof(string));
}
示例8: SetObjectData
/// <summary>
/// Deserializes the DensityImagePlotItem Version 0.
/// </summary>
/// <param name="obj">The empty DensityImagePlotItem object to deserialize into.</param>
/// <param name="info">The serialization info.</param>
/// <param name="context">The streaming context.</param>
/// <param name="selector">The deserialization surrogate selector.</param>
/// <returns>The deserialized DensityImagePlotItem.</returns>
public object SetObjectData(object obj,System.Runtime.Serialization.SerializationInfo info,System.Runtime.Serialization.StreamingContext context,System.Runtime.Serialization.ISurrogateSelector selector)
{
DensityImagePlotItem s = (DensityImagePlotItem)obj;
s.m_PlotAssociation = (XYZMeshedColumnPlotData)info.GetValue("Data",typeof(XYZMeshedColumnPlotData));
s.m_PlotStyle = (DensityImagePlotStyle)info.GetValue("Style",typeof(DensityImagePlotStyle));
return s;
}
示例9: getIntProperty
/// <summary> Read the specified integer property.
/// <p>
/// Throws an exception if the property value isn't an integer.
/// *
/// </summary>
/// <param name="key">the name of the property
/// </param>
/// <returns> the integer value of the property
///
/// </returns>
public static int getIntProperty(System.Configuration.AppSettingsReader properties, System.Object key)
{
System.String string_Renamed = (System.String) properties.GetValue(key.ToString(), Type.GetType("System.String"));
if (string_Renamed == null)
System.Console.Error.WriteLine("WARN: couldn't find integer value under '" + key + "'");
return System.Int32.Parse((System.String) properties.GetValue(key.ToString(), Type.GetType("System.String")));
}
示例10: SetObjectData
/// <summary>
/// Deserializes the XYColumnPlotItem Version 0.
/// </summary>
/// <param name="obj">The empty XYColumnPlotItem object to deserialize into.</param>
/// <param name="info">The serialization info.</param>
/// <param name="context">The streaming context.</param>
/// <param name="selector">The deserialization surrogate selector.</param>
/// <returns>The deserialized XYColumnPlotItem.</returns>
public object SetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISurrogateSelector selector)
{
XYColumnPlotItem s = (XYColumnPlotItem)obj;
s.Data = (XYColumnPlotData)info.GetValue("Data", typeof(XYColumnPlotData));
s.Style = (G2DPlotStyleCollection)info.GetValue("Style", typeof(G2DPlotStyleCollection));
return s;
}
示例11: Html
/// <summary>
/// Constructor.
/// </summary>
/// <param name="info">The SerializationInfo to get the data from.</param>
/// <param name="context">The destination (see System.Runtime.Serialization.StreamingContext) for this serialization.</param>
protected Html(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
if (info == null)
throw new System.ArgumentNullException("info");
htmlData = (string)info.GetValue("htmlData", typeof(string));
flowDocumentData = (string)info.GetValue("flowDocumentData", typeof(string));
vModellDirectory = (string)info.GetValue("vModellDirectory", typeof(string));
}
示例12: FileSyncException
protected FileSyncException(System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
if (info != null)
{
this.Operation = (FileSyncOperation)info.GetValue("Operation", typeof(FileSyncOperation));
this.SourceFile = (IcyFileSystemInfo)info.GetValue("SourceFile", typeof(IcyFileSystemInfo));
this.DestinationFile = (IcyFileSystemInfo)info.GetValue("DestinationFile", typeof(IcyFileSystemInfo));
}
}
示例13: ClearAll
public void ClearAll()
{
// Type
Array @this = new[] {"Fizz", "Buzz"};
// Exemples
@this.ClearAll(); // Remove all entries.
// Unit Test
Assert.AreEqual(null, @this.GetValue(0));
Assert.AreEqual(null, @this.GetValue(1));
}
示例14: TaskService
private TaskService(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
this.BeginInit();
this.AllowReadOnlyTasks = false;
this.TargetServer = (string)info.GetValue("TargetServer", typeof(string));
this.UserName = (string)info.GetValue("UserName", typeof(string));
this.UserAccountDomain = (string)info.GetValue("UserAccountDomain", typeof(string));
this.UserPassword = (string)info.GetValue("UserPassword", typeof(string));
this.forceV1 = (bool)info.GetValue("forceV1", typeof(bool));
ResetHighestSupportedVersion();
this.EndInit();
}
示例15: WriteArray
public void WriteArray(System.Array _array)
{
// Initialise with symbol to indicate start of array
StringBuilder.Append('[');
switch (_array.Rank)
{
case 1:
int _1DArrayLength = _array.Length;
for (int _iter = 0; _iter < _1DArrayLength; _iter++)
{
if (_iter != 0)
StringBuilder.Append(',');
WriteObjectValue(_array.GetValue(_iter));
}
break;
case 2:
int _outerArrayLength = _array.GetLength(0);
int _innerArrayLength = _array.GetLength(1);
for (int _outerIter = 0; _outerIter < _outerArrayLength; _outerIter++)
{
if (_outerIter != 0)
StringBuilder.Append(',');
// Append symbol to indicate start of json string representation of inner array
StringBuilder.Append('[');
for (int _innerIter = 0; _innerIter < _innerArrayLength; _innerIter++)
{
if (_innerIter != 0)
StringBuilder.Append(',');
WriteObjectValue(_array.GetValue(_outerIter, _innerIter));
}
// Append symbol to indicate end of json string representation of inner array
StringBuilder.Append(']');
}
break;
}
// Append symbol to indicate end of json string representation of array
StringBuilder.Append(']');
return;
}