davesnb
asked on
Change object properties from get to get ; set
How do I change a property of an object from get only to get; set . Below is the sample code, I wish to change "clientcredentials" to be {get ; set } . Never quite picked up on this concept in powershell101.
$proxy |gm
TypeName: ReservationInvoiceServiceClient
Name MemberType Definition
---- ---------- ----------
Abort Method System.Void Abort()
BeginClose Method System.IAsyncResult BeginClose(System.AsyncCallback callback, System.Object state), System.IAsyncResult BeginClose(System.TimeSpan timeout, System.AsyncCa...
BeginOpen Method System.IAsyncResult BeginOpen(System.AsyncCallback callback, System.Object state), System.IAsyncResult BeginOpen(System.TimeSpan timeout, System.AsyncCall...
Close Method System.Void Close(), System.Void Close(System.TimeSpan timeout)
DisplayInitializationUI Method System.Void DisplayInitializationUI()
Dispose Method System.Void Dispose()
EndClose Method System.Void EndClose(System.IAsyncResult result)
EndOpen Method System.Void EndOpen(System.IAsyncResult result)
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetReservation Method Company.Product.IWeb.ReservationResponse, 0ofr1eqk, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null GetReservation(Companys.Product.IWeb.Reservatio...
GetType Method type GetType()
Open Method System.Void Open(), System.Void Open(System.TimeSpan timeout)
ToString Method string ToString()
ChannelFactory Property System.ServiceModel.ChannelFactory`1[[IReservationInvoiceService, 0ofr1eqk, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]] ChannelFactory {get;}
ClientCredentials Property System.ServiceModel.Description.ClientCredentials ClientCredentials {get;}
Endpoint Property System.ServiceModel.Description.ServiceEndpoint Endpoint {get;}
InnerChannel Property System.ServiceModel.IClientChannel InnerChannel {get;}
State Property System.ServiceModel.CommunicationState State {get;}
Is this a custom object your creating / coding?
ASKER
It is a web service , but I was told i could connect via
WebServiceClient.ClientCre dentials.U serName.Us erName = "username";
WebServiceClient.ClientCre dentials.U serName.Pa ssword = "password";
When i run proxy.open it will attempt to pass the credentials, so appears the credential property needs to be get; set.
So really two part question, with the goal of connecting to this webservice using the wcf web proxy functions i found on posh code.
WebServiceClient.ClientCre
WebServiceClient.ClientCre
When i run proxy.open it will attempt to pass the credentials, so appears the credential property needs to be get; set.
So really two part question, with the goal of connecting to this webservice using the wcf web proxy functions i found on posh code.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.