protected virtual void ParseDeviceReferences([NotNull] ItemParseContext context, [NotNull, ItemNotNull] ICollection <IReference> references, [NotNull] IProjectItem projectItem, [NotNull] ITextNode deviceTextNode) { var deviceNameProperty = new SourceProperty <string>(projectItem, "Name", string.Empty, SourcePropertyFlags.IsShort); deviceNameProperty.Parse(deviceTextNode); references.Add(Factory.DeviceReference(projectItem, deviceNameProperty, string.Empty, context.ParseContext.Database.DatabaseName)); var layoutProperty = new SourceProperty <string>(projectItem, "Layout", string.Empty, SourcePropertyFlags.IsShort); layoutProperty.Parse(deviceTextNode); references.Add(Factory.LayoutReference(projectItem, layoutProperty, string.Empty, context.ParseContext.Database.DatabaseName)); foreach (var renderingTextNode in deviceTextNode.ChildNodes) { ParseRenderingReferences(context, references, projectItem, renderingTextNode); } }
protected virtual void ParseDeviceReferences([NotNull] ItemParseContext context, [NotNull] [ItemNotNull] ICollection<IReference> references, [NotNull] IProjectItem projectItem, [NotNull] ITextNode deviceTextNode) { var deviceNameProperty = new SourceProperty<string>("Name", string.Empty, SourcePropertyFlags.IsShort); deviceNameProperty.Parse(deviceTextNode); references.Add(context.ParseContext.Factory.DeviceReference(projectItem, deviceNameProperty)); var layoutProperty = new SourceProperty<string>("Layout", string.Empty, SourcePropertyFlags.IsShort); layoutProperty.Parse(deviceTextNode); references.Add(context.ParseContext.Factory.LayoutReference(projectItem, layoutProperty)); var renderingsTextNode = deviceTextNode.GetSnapshotLanguageSpecificChildNode("Renderings"); if (renderingsTextNode == null) { return; } foreach (var renderingTextNode in renderingsTextNode.ChildNodes) { ParseRenderingReferences(context, references, projectItem, renderingTextNode); } }