Dev Ops - lerwine/FsInfoCat GitHub Wiki

HomeSetup and Configuration | Development Environment Setup


Search/replace patterns

Add Working category

\[Test,\s+Property\("Priority",\s+(\d+)\)(,\s+Ignore(\(("[^"]*")?\))?,)?\]
[Test, Property("Priority", $1)$2, NUnit.Framework.Category("Working")]

Remove Working category

\[Test, Property\("Priority",\s+(\d+)\)(,\s+Ignore(\(("[^"]*")?\))?,)?\s+NUnit.Framework.Category\("Working"\)\]
[Test, Property("Priority", $1)$2]

Add Ignore

\[Test,\s+Property\("Priority",\s+(\d+)\)(,\s+NUnit.Framework.Category\("Working"\))?\]
[Test, Property("Priority", $1), Ignore$2]

Remove Ignore

\[Test, Property\("Priority",\s+(\d+)\),\s+Ignore(,\s+NUnit.Framework.Category\("Working"\))?\]
[Test, Property("Priority", $1)$2]

Obsolete references

\[(System\.)?Obsolete(\(("[^"]*")?\))?\]

Not Implemented

throw new (System\.)?NotImplementedException\(

Matching parantheses

^[^()]*(?>(?>(?'open'\()[^()]*)+(?>(?'-open'\))[^()]*)+)+(?(open)(?!))$

Matching braces

[^{}]*(?>(?>(?'open'\{)[^{}]*)+(?>(?'-open'\})[^{}]*)+)*(?(open)(?!))

Remove converter from binding

(\s*,\s*)?Converter=[^",{}]*(?>(?>(?'open'\{)[^",{}]*)+(?>(?'-open'\})[^",{}]*)+)*(?(open)(?!))\s*

Remove bound attribute

[\s\r\n]+(?!Text|Content|Checked|Margin|Padding)\w+="\{Binding (?!(ElementName|RelativeSource)=)[^"{}]+(?>(?>(?'open'\{)[^{}]*)+(?>(?'-open'\})[^{}]*)+)*(?(open)(?!))\}"

Add command to markup

<Button(?=\s)(((?!\s+(Style|Command)=)\s+[^\s/="]+="[^"]+")*\s+Style="\{DynamicResource SyncDisabledButton\}"((?!\s+Command=)\s+[^\s/="]+="[^"]+")*)\s*/>
<Button$1 Command="{Binding SynchronizeNowCommand}"/>

Add Attribute to markup

<Button(?=(?:(?!\s+Style=)\s+[^\s/="]+="[^"]+")*\s+Style="\{DynamicResource SyncDisabledButton\}")((?:(?!\s+ToolTip=)\s+[^\s/="]+="[^"]+")+)\s*/>
<Button$1 ToolTip="Synchronization disabled - no remote connection configured."/>

Replace attribute

<Button(?=(?:(?!\s+Style=)\s+[^\s/="]+="[^"]+")*\s+Style="\{DynamicResource SyncDisabledButton\}")((?:(?!\s+ToolTip=)\s+[^\s/="]+="[^"]+")*\s+)ToolTip="(?!Synchronization disabled - no remote connection configured\x")[^"]*"((?:\s+[^\s/="]+="[^"]+")*\s*/>)
<Button$1ToolTip="Synchronization disabled - no remote connection configured."$2
(<Page(?:Function)?(?:(?![\s\r\n]+Title=)[\s\r\n]+[^\s/="]+="[^"]+")*[\s\r\n]+)Title="([^"]+)"
$1WindowTitle="$2"
((?:\r\n?|\n)[^\S\r\n]+)internal\s+static\s+void\s+OnBuildEntity\(EntityTypeBuilder<(\w+)>\s+builder\)\s+=>\s+builder\.ToView\(VIEW_NAME\);(?![\s\r\n]+_)
$1internal static void OnBuildEntity(EntityTypeBuilder<$2> builder)$1{$1    _ = builder.ToView(VIEW_NAME).HasKey(nameof(Id));$1    _ = builder.Property($3$1}
=>\s+builder\.ToView\(VIEW_NAME\);(?![\s\r\n]+_)
=> builder.ToView(VIEW_NAME).HasKey(nameof(Id));

Textbox To Label

([\s\r\n]+)<TextBox Style="[^"]+" ToolTip="" Text="\{Binding (\w+)\}"/>
$1<Label Padding="{DynamicResource DefaultSpacingTopLeft}" Content="$2"/>$1<TextBox Margin="{DynamicResource DefaultSpacingLeft}" Style="{DynamicResource MultiLineReadOnlyValueTextBox}" Text="{Binding $2}"/>

Dependency Property Refactor #1

With generic entity type, string type, and no change call-back

DependencyProperty\.Register\(nameof\((\w+)\),[\s\r\n]*typeof\(string\),[\s\r\n]*typeof\(([^)<]+)<(\w+)>\),[\s\r\n]*new[\s\r\n]PropertyMetadata\(("[^"]*"|null|\w+\.\w+)\)\);[ \t]*(\r?\n)[\r\n]*([ \t]+)

$1: Property Name $2: Owner Class Name $3: Entity Type Name (generic) $4: Default Value $5: New Line $6 Indent

ColumnPropertyBuilder<string, $2<$3>>$5$6    .Register(nameof(IVolumeListItemWithFileSystem.$1))$5$6    .DefaultValue($4)$5$6    .AsReadWrite();$5$5$6

Dependency Property Refactor #1b

With generic entity type, string type, and no change call-back

DependencyProperty\.RegisterReadOnly\(nameof\((\w+)\),[\s\r\n]*typeof\(string\),[\s\r\n]*typeof\(([^)<]+)<(\w+)>\),[\s\r\n]*new[\s\r\n]PropertyMetadata\(("[^"]*"|null|\w+\.\w+)\)\);[ \t]*(\r?\n)[\r\n]*([ \t]+)

$1: Property Name $2: Owner Class Name $3: Entity Type Name (generic) $4: Default Value $5: New Line $6 Indent

ColumnPropertyBuilder<string, $2<$3>>$5$6    .Register(nameof(IVolumeListItemWithFileSystem.$1))$5$6    .DefaultValue($4)$5$6    .AsReadOnly();$5$5$6

Dependency Property Refactor #2

With generic entity type and no change call-back (not intended for strings)

DependencyProperty\.Register\(nameof\((\w+)\),[\s\r\n]*typeof\((\w+\??)\),[\s\r\n]*typeof\(([^)<]+)<(\w+)>\),[\s\r\n]*new[\s\r\n]PropertyMetadata\(((?:\w+\.)?\w+|default\(\w+\))\)\);[ \t]*(\r?\n)[\r\n]*([ \t]+)

$1: Property Name $2: Property Type $3: Owner Class Name $4: Entity Type Name (generic) $5: Default Value $6: New Line $7 Indent

ColumnPropertyBuilder<$2, $3<$4>>$6$7    .Register(nameof(IVolumeListItemWithFileSystem.$1))$6$7    .DefaultValue($5)$6$7    .AsReadWrite();$6$6$7

Dependency Property Refactor #2b

With generic entity type and no change call-back (not intended for strings)

DependencyProperty\.RegisterReadOnly\(nameof\((\w+)\),[\s\r\n]*typeof\((\w+\??)\),[\s\r\n]*typeof\(([^)<]+)<(\w+)>\),[\s\r\n]*new[\s\r\n]PropertyMetadata\(((?:\w+\.)?\w+|default\(\w+\))\)\);[ \t]*(\r?\n)[\r\n]*([ \t]+)

$1: Property Name $2: Property Type $3: Owner Class Name $4: Entity Type Name (generic) $5: Default Value $6: New Line $7 Indent

ColumnPropertyBuilder<$2, $3<$4>>$6$7    .Register(nameof(IVolumeListItemWithFileSystem.$1))$6$7    .DefaultValue($5)$6$7    .AsReadOnly();$6$6$7

Dependency Property Refactor #3

With generic entity type and string value type

DependencyProperty\.Register\(nameof\((\w+)\),[\s\r\n]*typeof\(string\),[\s\r\n]*typeof\(([^)<]+)<(\w+)>\),[\s\r\n]*new[\s\r\n]PropertyMetadata\(("[^"]*"|null|\w+\.\w+),[\s\r\n]*[^=]+=>[\s\r\n]*\([^)]+\)\??\.On\w+\((?:\S+\s+as\s+string,[\s\r\n]*\S+\s+as\s+string|\([^)]+\)[^()]+\([^)]+\)[^)]+)\){3};[ \t]*(\r?\n)[\r\n]*([ \t]+)

$1: Property Name $2: Owner Class Name $3: Entity Type Name (generic) $4: Default Value $5: NewLine $6: Indent

ColumnPropertyBuilder<string, $2<$3>>$5$6    .RegisterEntityMapped<$3>(nameof(IVolumeListItemWithFileSystem.$1))$5$6    .DefaultValue($4)$5$6    .OnChanged((d, oldValue, newValue) => (d as $2<$3>)?.On$1PropertyChanged(oldValue, newValue))$5$6    .CoerseWith(NonWhiteSpaceOrEmptyStringCoersion.Default).AsReadWrite();$5$5$6

Dependency Property Refactor #3b

With generic entity type and string value type

DependencyProperty\.RegisterReadOnly\(nameof\((\w+)\),[\s\r\n]*typeof\(string\),[\s\r\n]*typeof\(([^)<]+)<(\w+)>\),[\s\r\n]*new[\s\r\n]PropertyMetadata\(("[^"]*"|null|\w+\.\w+),[\s\r\n]*[^=]+=>[\s\r\n]*\([^)]+\)\??\.On\w+\((?:\S+\s+as\s+string,[\s\r\n]*\S+\s+as\s+string|\([^)]+\)[^()]+\([^)]+\)[^)]+)\){3};[ \t]*(\r?\n)[\r\n]*([ \t]+)

$1: Property Name $2: Owner Class Name $3: Entity Type Name (generic) $4: Default Value $5: NewLine $6: Indent

ColumnPropertyBuilder<string, $2<$3>>$5$6    .RegisterEntityMapped<$3>(nameof(IVolumeListItemWithFileSystem.$1))$5$6    .DefaultValue($4)$5$6    .OnChanged((d, oldValue, newValue) => (d as $2<$3>)?.On$1PropertyChanged(oldValue, newValue))$5$6    .CoerseWith(NonWhiteSpaceOrEmptyStringCoersion.Default).AsReadOnly();$5$5$6

Dependency Property Refactor #4

With generic entity type, not intended for strings

DependencyProperty\.Register\(nameof\((\w+)\),[\s\r\n]*typeof\((\w+\??)\),[\s\r\n]*typeof\(([^)<]+)<(\w+)>\),[\s\r\n]*new[\s\r\n]PropertyMetadata\(((?:\w+\.)?\w+|default\(\w+\)),[\s\r\n]*\([^),]+,[^),]+\)[\s\r\n]*=>[\s\r\n]*\([^)]+\)\??\.On\w+\(\([^)]+\)[^()]+\([^)]+\)[^)]+\){3};[ \t]*(\r?\n)[\r\n]*([ \t]+)

$1: Property Name $2: Property Type $3: Owner Class Name $4: Entity Type Name (generic) $5: Default Value $6: New Line $7: Indent

ColumnPropertyBuilder<$2, $3<$4>>$6$7    .RegisterEntityMapped<$4>(nameof(IVolumeListItemWithFileSystem.$1))$6$7    .DefaultValue($5)$6$7    .OnChanged((d, oldValue, newValue) => (d as $3<$4>)?.On$1PropertyChanged(oldValue, newValue))$6$7    .AsReadWrite();$6$6$7

Dependency Property Refactor #4b

With generic entity type, not intended for strings

DependencyProperty\.RegisterReadOnly\(nameof\((\w+)\),[\s\r\n]*typeof\((\w+\??)\),[\s\r\n]*typeof\(([^)<]+)<(\w+)>\),[\s\r\n]*new[\s\r\n]PropertyMetadata\(((?:\w+\.)?\w+|default\(\w+\)),[\s\r\n]*\([^),]+,[^),]+\)[\s\r\n]*=>[\s\r\n]*\([^)]+\)\??\.On\w+\(\([^)]+\)[^()]+\([^)]+\)[^)]+\){3};[ \t]*(\r?\n)[\r\n]*([ \t]+)

$1: Property Name $2: Property Type $3: Owner Class Name $4: Entity Type Name (generic) $5: Default Value $6: New Line $7: Indent

ColumnPropertyBuilder<$2, $3<$4>>$6$7    .RegisterEntityMapped<$4>(nameof(IVolumeListItemWithFileSystem.$1))$6$7    .DefaultValue($5)$6$7    .OnChanged((d, oldValue, newValue) => (d as $3<$4>)?.On$1PropertyChanged(oldValue, newValue))$6$7    .AsReadOnly();$6$6$7

Git Commands

Update forked repository from upstream

git pull --tags origin main
git fetch upstream
git merge upstream/main
git push origin main:main
cd wiki
git pull origin master
git fetch

Generating and testing password hashes

Run the PasswordHelper.ps1 script to create and testing password hash strings that are compatible with those stored in the database.


HomeSetup and Configuration | Development Environment Setup

⚠️ **GitHub.com Fallback** ⚠️