This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void CopyDirectory(string source, string destination) | |
{ | |
// Get the subdirectories for the specified directory. | |
var dir = new DirectoryInfo(source); | |
var dirs = dir.GetDirectories(); | |
if (!dir.Exists) | |
{ | |
throw new DirectoryNotFoundException( | |
"Source directory does not exist or could not be found: " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void CopyDirectory(string source, string destination, string[] subdirsToIgnore) | |
{ | |
// Get the subdirectories for the specified directory. | |
var dir = new DirectoryInfo(source); | |
var dirs = dir.GetDirectories(); | |
if (!dir.Exists) | |
{ | |
throw new DirectoryNotFoundException( | |
"Source directory does not exist or could not be found: " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function deepcopy<T = {}>(obj: T): T { | |
return <T>JSON.parse(JSON.stringify(obj)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ng-container matColumnDef="select"> | |
<mat-header-cell *matHeaderCellDef> | |
<mat-checkbox (change)="$event ? masterToggle() : null" [checked]="selection.hasValue() && isAllSelected()" | |
[indeterminate]="selection.hasValue() && !isAllSelected()"></mat-checkbox> | |
</mat-header-cell> | |
<mat-cell *matCellDef="let row"> | |
<mat-checkbox [checked]="selection.isSelected(row)" (click)="$event.stopPropagation()" | |
(change)="$event ? selection.toggle(row) : null"></mat-checkbox> | |
</mat-cell> | |
</ng-container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mat-table class="mat-elevation-z8" [dataSource]="dataSource"> | |
<!-- columns here --> | |
<ng-container matColumnDef="noData"> | |
<mat-footer-cell *matFooterCellDef [attr.colspan]="displayedColumns.length"> | |
No records found. | |
</mat-footer-cell> | |
</ng-container> | |