Ejemplo n.º 1
0
        protected override void BeginProcessing()
        {
            if (RMConverterSetting == null)
            {
                ObjectSetting s = new ObjectSetting()
                {
                    AnchorAttributes            = AnchorAttributes.ToList(),
                    AttributExclusions          = AttributExclusions.ToList(),
                    IDPrefix                    = IDPrefix,
                    IncludeDefaultAttributes    = IncludeDefaultAttributes,
                    IncludeEmptyAttributeValues = IncludeEmptyAttributeValues,
                    ObjectSpecificExlusions     = RMConverterObjectExclusions.ToList(),
                    ObjectType                  = Resources[0].InternalObject.ObjectTypeName
                };

                RMConverterSetting = new ConverterSetting()
                {
                    Configurations = new List <ObjectSetting>()
                    {
                        s
                    }
                };
            }

            rmConfigConverter = new Converter(RMConverterSetting);
        }
Ejemplo n.º 2
0
        protected override void ProcessRecord()
        {
            if (ObjectSettings != null)
            {
                this.WriteObject(
                    new ConverterSetting()
                {
                    Configurations = ObjectSettings.ToList()
                });
            }
            else
            {
                ObjectSetting config = new ObjectSetting()
                {
                    AnchorAttributes            = AnchorAttributes?.ToList(),
                    AttributExclusions          = AttributExclusions?.ToList(),
                    IDPrefix                    = IDPrefix,
                    IncludeDefaultAttributes    = IncludeDefaultAttributes.IsPresent,
                    IncludeEmptyAttributeValues = IncludeEmptyAttributeValues.IsPresent,
                    ObjectSpecificExlusions     = ObjectSpecificExlusions?.ToList(),
                    ObjectType                  = ObjectType,
                    ReferenceResolution         = ReferenceResolution.IsPresent
                };

                this.WriteObject(
                    new ConverterSetting()
                {
                    Configurations = new List <ObjectSetting>()
                    {
                        config
                    }
                });
            }
        }
Ejemplo n.º 3
0
 protected override void ProcessRecord()
 {
     this.WriteObject(
         new ObjectSetting()
     {
         AnchorAttributes                      = AnchorAttributes?.ToList(),
         AttributExclusions                    = AttributExclusions?.ToList(),
         IDPrefix                              = IDPrefix,
         IncludeDefaultAttributes              = IncludeDefaultAttributes.IsPresent,
         IncludeEmptyAttributeValues           = IncludeEmptyAttributeValues.IsPresent,
         ObjectSpecificExlusions               = ObjectSpecificExlusions?.ToList(),
         ObjectType                            = ObjectType,
         ReferenceResolution                   = ReferenceResolution.IsPresent,
         ReferenceResolutionAttributExclusions = ReferenceResolutionAttributExclusions?.ToList()
     });
 }