protected override void ProcessRecord()
        {
            var connection = DatabaseConnection.Current;

            using (var command = new SqlCommand("Select [Id],[Extension],[IsImage],[Ignored] from [Extension]"))
            {
                command.Connection = connection;
                WhereCauseBuilder whereCauseBuilder = new WhereCauseBuilder(command.Parameters);

                whereCauseBuilder.AddStringComparingCause("Extension", Extension, ExtensionPropertyComparingModes);
                whereCauseBuilder.AddBitComparingCause("IsImage", IsImage);
                whereCauseBuilder.AddBitComparingCause("Ignored", Ignored);

                command.CommandText += whereCauseBuilder.ToFullWhereCommand();

                List <ImageStoreExtension> result = new List <ImageStoreExtension>();

                using (var reader = command.ExecuteReader(System.Data.CommandBehavior.SequentialAccess))
                {
                    while (reader.Read())
                    {
                        ImageStoreExtension line = new ImageStoreExtension((Guid)reader[0])
                        {
                            Extension = (string)reader[1],
                            IsImage   = (bool)reader[2],
                            Ignored   = (bool)reader[3]
                        };
                        result.Add(line);
                    }
                    reader.Close();
                }

                WriteObject(result);
            }
        }
        protected override void ProcessRecord()
        {
            var connection = DatabaseConnection.Current;

            using (var command = new SqlCommand("Select [Id],[FolderId],[Directory],[IsSubDirectoryIncluded] from [IgnoredDirectory]"))
            {
                command.Connection = connection;
                WhereCauseBuilder whereCauseBuilder = new WhereCauseBuilder(command.Parameters);

                whereCauseBuilder.AddUniqueIdentifierComparingCause("FolderId", FolderId);
                whereCauseBuilder.AddStringComparingCause("Directory", Directory, DirectoryPropertyComparingModes);
                whereCauseBuilder.AddBitComparingCause("IsSubDirectoryIncluded", IsSubDirectoryIncluded);

                command.CommandText += whereCauseBuilder.ToFullWhereCommand();

                List <ImageStoreIgnoredDirectory> result = new List <ImageStoreIgnoredDirectory>();

                using (var reader = command.ExecuteReader(System.Data.CommandBehavior.SequentialAccess))
                {
                    while (reader.Read())
                    {
                        ImageStoreIgnoredDirectory line = new ImageStoreIgnoredDirectory((Guid)reader[0])
                        {
                            FolderId  = (Guid)reader[1],
                            Directory = (string)reader[2],
                            IsSubDirectoryIncluded = (bool)reader[3]
                        };
                        result.Add(line);
                    }
                    reader.Close();
                }

                WriteObject(result);
            }
        }
        protected override void ProcessRecord()
        {
            var connection = DatabaseConnection.Current;

            using (var command = new SqlCommand("Select [Id],[Path],[Name],[CompareImageWith],[IsSealed] from [Folder]"))
            {
                command.Connection = connection;
                WhereCauseBuilder whereCauseBuilder = new WhereCauseBuilder(command.Parameters);

                whereCauseBuilder.AddStringComparingCause("Name", Name, NamePropertyComparingModes);
                whereCauseBuilder.AddStringComparingCause("Path", Path, PathPropertyComparingModes);
                whereCauseBuilder.AddIntComparingCause("CompareImageWith", (int?)CompareImageWith);
                whereCauseBuilder.AddBitComparingCause("IsSealed", IsSealed);

                command.CommandText += whereCauseBuilder.ToFullWhereCommand();

                List <ImageStoreFolder> result = new List <ImageStoreFolder>();

                using (var reader = command.ExecuteReader(System.Data.CommandBehavior.SequentialAccess))
                {
                    while (reader.Read())
                    {
                        ImageStoreFolder line = new ImageStoreFolder((Guid)reader[0], (string)reader[1])
                        {
                            Name = (string)reader[2],
                            CompareImageWithCode = (int)reader[3],
                            IsSealed             = (bool)reader[4]
                        };
                        result.Add(line);
                    }
                    reader.Close();
                }

                WriteObject(result);
            }
        }