public override void ExecuteCmdlet() { PSSqlIndexingPolicy sqlIndexingPolicy = new PSSqlIndexingPolicy(); if (IncludedPath != null && IncludedPath.Length > 0) { sqlIndexingPolicy.IncludedPaths = new List <PSIncludedPath>(IncludedPath); } if (ExcludedPath != null && ExcludedPath.Length > 0) { sqlIndexingPolicy.ExcludedPaths = new List <PSExcludedPath>(); foreach (string path in ExcludedPath) { sqlIndexingPolicy.ExcludedPaths.Add(new PSExcludedPath { Path = path }); } } if (SpatialSpec != null) { sqlIndexingPolicy.SpatialIndexes = SpatialSpec; } if (CompositePath != null) { sqlIndexingPolicy.CompositeIndexes = CompositePath; } sqlIndexingPolicy.Automatic = Automatic; if (IndexingMode != null) { sqlIndexingPolicy.IndexingMode = IndexingMode; } WriteObject(sqlIndexingPolicy); return; }
public override void ExecuteCmdlet() { PSSqlIndexingPolicy sqlIndexingPolicy = new PSSqlIndexingPolicy(); if (IncludedPath != null && IncludedPath.Length > 0) { sqlIndexingPolicy.IncludedPaths = IncludedPath; } if (ExcludedPath != null && ExcludedPath.Length > 0) { sqlIndexingPolicy.ExcludedPaths = ExcludedPath; } sqlIndexingPolicy.Automatic = Automatic; if (IndexingMode != null) { sqlIndexingPolicy.IndexingMode = IndexingMode; } WriteObject(sqlIndexingPolicy); return; }