BranchPresets.LayoutHelper.ApplyActionToAllSharedRenderings C# (CSharp) 메소드

ApplyActionToAllSharedRenderings() 공개 정적인 메소드

Helper method that loops over all Shared renderings in all devices attached to an item and invokes a function on each of them. The function may request the deletion of the item by returning a specific enum value.
public static ApplyActionToAllSharedRenderings ( System.Item item, RenderingActionResult>.Func action ) : void
item System.Item
action RenderingActionResult>.Func
리턴 void
		public static void ApplyActionToAllSharedRenderings(Item item, Func<RenderingDefinition, RenderingActionResult> action)
		{
			// NOTE: when dealing with layouts its important to get and set the field value with LayoutField.Get/SetFieldValue()
			// if you fail to do this you will not process layout deltas correctly and may instead override all fields (breaking full inheritance), 
			// or attempt to get the layout definition for a delta value, which will result in your wiping the layout details when they get saved.

			ApplyActionToAllRenderings(item, FieldIDs.LayoutField, action);
		}