Share via


ProfileService.SetPropertiesForCurrentUser 方法

定義

設定使用者設定檔中指定的屬性值。

public:
 System::Collections::ObjectModel::Collection<System::String ^> ^ SetPropertiesForCurrentUser(System::Collections::Generic::IDictionary<System::String ^, System::Object ^> ^ values, bool authenticatedUserOnly);
[System.ServiceModel.OperationContract]
public System.Collections.ObjectModel.Collection<string> SetPropertiesForCurrentUser (System.Collections.Generic.IDictionary<string,object> values, bool authenticatedUserOnly);
[<System.ServiceModel.OperationContract>]
member this.SetPropertiesForCurrentUser : System.Collections.Generic.IDictionary<string, obj> * bool -> System.Collections.ObjectModel.Collection<string>
Public Function SetPropertiesForCurrentUser (values As IDictionary(Of String, Object), authenticatedUserOnly As Boolean) As Collection(Of String)

參數

values
IDictionary<String,Object>

集合,包含要設定的設定檔屬性名稱和值。

authenticatedUserOnly
Boolean

值,表示是否僅設定已驗證使用者的屬性。

傳回

未設定的使用者設定檔屬性 (如果有的話)。

屬性

備註

您可以使用 SetPropertiesForCurrentUser 方法,從與 Windows Communication Foundation 相容的應用程式設定使用者設定檔屬性, (WCF) 。 方法 SetPropertiesForCurrentUser 會傳回未設定的任何值,可能基於下列其中一個原因:

  • 指定的配置檔案屬性是唯讀的, (WriteAccessProperties 指定的配置檔案屬性未設定為 true) 。

  • 使用者設定檔沒有具有相符名稱的配置檔案屬性。

  • 驗證值失敗。

適用於