問題タブ [configurationelement]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
0 に答える
248 参照

c# - バインドされた ConfigurationElement のプロパティが変更された場合、ListView.SelectedItem は変更されません。

次のように派生したクラスがありConfigurationElementます。

次のように、を含むビューがありますListView

View の ViewModel は次のとおりです。

whereObservantは を実装する基本クラスですINotifyPropertyChanged

でアイテムを選択した後、プロパティListViewを使用して ViewModel のアイテムを更新しSelectedItem([変更] ボタンをクリックして)、うまくいきました。ただし、現在のアイテムを変更した後に別のアイテムを選択しようとすると、次のように現在のアイテムが選択解除されません。

ここに画像の説明を入力

Itemフィールドを使用する実装と比較すると、プロパティのゲッターとセッターの実装が異なることは承知しています。Item構成ファイルからロード/永続化される構成の一部であるため、そのように実装されます。

私の質問は、フィールドを使用するゲッター/セッターを使用せずにこれを修正することは可能ですか?

0 投票する
1 に答える
344 参照

automapper - AutoMapper を使用してリストをマップする to ConfigurationElementCollection

I am having a bit of a problem using AutoMapper with some Configuration Elements. I have the following classes:

public class SocialLinkSettingConfigurati

I am having a bit of a problem using AutoMapper with some Configuration Elements. I have the following classes:

I can create a mapping between SocialLinkSetting and SocialLinkSettingConfiguration just fine. However, when I am trying to convert a list of SocialLinkSetting to SocialLinkSettingConfigurationCollection, I fail every time.

What I am trying to do is take a list of Social Links, and convert it to a single SocialLinkSettingConfigurationCollection object that has all of the SocialLinkSetting inside and converted to SocialLinkSettingConfiguration.

I can't seem to do this. Each time, it doesn't know how to convert List to the SocialLinkSettingConfigurationCollection, then add each of the items.

Any help would be greatly appreciated.

Thanks, Ben


This maybe deserves a better answer. So let me explain. In Visual Studio Code you have to set up your startup projects all in the launch.json and the tasks.json files.

Here is a small detailed introduction:

  1. Choose a root project folder (i.e.: D:/anyfolder/myrootfolder)

  2. Create two folders for two projects in the root folder
    2.1 D:/anyfolder/myrootfolder/project1
    2.2 D:/anyfolder/myrootfolder/project2

  3. Open cmd and create two Console-Applications (I use .netcore 2.0)
    3.1 go to folders project1 and project2 using cmd (Command: cd -foldername-)
    3.2 for each of that folders execute the command: dotnet new console

  4. Open the root project folder with Visual Studio Code

  5. Add the following launch.json and tasks.json to the .vscode folder (usually the .vscode folder is generated after clicked the debug-button in VS Code)
    For More information visit:https://code.visualstudio.com/docs/editor/debugging

Sample launch.json file:

Sample tasks.json file:

Don't forget that I used .netcore 2.0. If you use another Target Framework you have to customize the upper sample files of course.

After all you should now see two items in right of the Play(Debug-)button:
.NET Core Launch Project1 and
.NET Core Launch Project2

This worked for me and my purposes...

0 投票する
1 に答える
115 参照

c# - SVCEditor の WCF BehaviorExtensionElement ネストされたプロパティ

カスタム メッセージ用に CustomBehaviorExtensionElement と CustomEndpointBehavior を作成しました。

しかし、SVCEditor では、クラス X509CertificateConfigurationElement のネストされたプロパティが表示されません。SVCEditor は Type 名のみを表示しますが、ネストされたプロパティ findValue、storeLocation、storeName、x509FindType を期待していました。 ここに例 があります。回答ありがとうございます。