2016-11-04 5 views
0

いくつかの設定が適用されているContainerPartが接続されている移行で新しいコンテンツタイプを作成しようとしています。新しいタイプのContainerPartの設定

ItemsShownデフォルトでは、移行後のデフォルト値はTrueのままです。 ContainerSettingsのような他のバージョンへの "ContainerPartSettingsを" 名前の変更

  • 、typeof演算()関数を使用して一部を指定しないContainerTypePartSettings

  • は、私はこのいくつかの異なるバリエーションを試してみました直接の文字列

私が知ることから、ContainerSettingsは値を保存するために別の方法を使用しますAutorouteSettingsのようなものへ、この問題を解決するには

.WithPart(typeof(ContainerPart).Name) // close the WithPart function 

    // which means the following line is chained to the type 
    .WithSetting("ContainerPartSettings.ItemsShownDefault", "False") 

このようにそれを実行します:あなたのコードを見てみると

答えて

2

、あなたの代わりに一部のご種類の設定を連鎖している

.WithPart(typeof(ContainerPart).Name, part => part 

    // inside the ContainerPart context 
    .WithSetting("ContainerPartSettings.ItemsShownDefault", "False") 
) // Close ContainerPart context 

.WithPart(..) 

パーツではなくタイプの設定を行うことを意味していた場合は、のdefiネックhere

.WithPart(typeof(ContainerPart).Name) 

// Set settings on the type instead of the part 
.WithSetting("ContainerTypePartSettings.ItemsShownDefault", false) 
関連する問題