Ejemplo n.º 1
0
 internal static HostInfo GetHostInfo(PSObject dataAsPSObject)
 {
     if (dataAsPSObject == null)
     {
         throw PSTraceSource.NewArgumentNullException("dataAsPSObject");
     }
     return(RemoteHostEncoder.DecodeObject(GetPropertyValue <PSObject>(dataAsPSObject, "HostInfo"), typeof(HostInfo)) as HostInfo);
 }
Ejemplo n.º 2
0
 internal static HostInfo GetHostInfo(PSObject dataAsPSObject)
 {
     using (RemotingDecoder._trace.TraceMethod())
         return(dataAsPSObject != null?RemoteHostEncoder.DecodeObject((object)RemotingDecoder.GetPropertyValue <PSObject>(dataAsPSObject, "HostInfo"), typeof(HostInfo)) as HostInfo : throw RemotingDecoder._trace.NewArgumentNullException(nameof(dataAsPSObject)));
 }