Blogger Area Post Template
Merged

Best Credit Cards To Build Credit History

best credit cards to build credit in 2025 top picks for a strong best credit building cards 2024 repair your credit rating best secured credit cards to build credit fast in 2026 u s with best secured credit card to build credit coast tradelines the best credit cards for building rebuilding credit youtube what is the best credit card to build credit coast tradelines the ultimate guide to the best credit cards to build credit coast top 5 secured credit cards for building credit in 2024 youtube best credit cards to build credit for young adults flik eco what are the best credit cards to get to build credit at mickey munos blog 7 best credit cards to build credit in 2023 money top 10 best credit cards to build credit updated 2024 9 best credit cards for building credit in 2023 5 best prepaid credit cards to build credit by christinathomas aug cibc costco mastercard review for 2026 snappy rates how to use a secured credit card to build credit self credit builder best credit cards to build credit 2026 8 best credit cards to build credit in 2026 pros cons 7 best credit cards to build credit fast in 2025 7 best credit cards to build credit in 2023 money top 6 best credit cards to build credit 2017 ranking reviews best credit cards to build credit top picks guide credit cards to build credit history discover best credit cards to build credit 2026 7 best credit cards for building credit 2025 best credit cards to build credit in 2024 credello best beginner credit cards to build credit of february 2025 forbes 5 best credit cards to build credit in 2020 benzinga cards to build credit credit card benefits 8 best credit cards to build credit in 2026 pros cons 5 best secured credit cards to build credit history and improve score what are the best credit cards to build credit beem top 6 best credit cards to build credit 2017 ranking reviews 5 best secured credit cards to build credit 2024 best credit cards to build credit in march 2026 8 best credit cards to build credit in 2026 pros cons the 7 best credit cards to build credit in 2023 reportwire credit cards to build credit history discover credit cards to build credit history discover how to build credit with a credit card best practices for beginners what are the best credit cards to get to build credit at mickey munos blog how to build credit the 7 step guide chime best credit cards for 18 year olds to build credit flik eco best credit cards to build credit 2023 loans canada 4 ways to establish credit creditrepair com best credit cards to build credit history milesopedia best capital one credit card to build credit in 2026 how to use a credit card to build credit in 2023 best guide 7 best credit cards to build credit in 2023 money best secured credit cards for building credit in 2024 establish or best credit cards to build credit history milesopedia how to build credit with a wells fargo credit card credello best secured credit cards to build your credit in 2026 earnin firstcard secured card build credit the smart way creditsoup com credit builder card the credit card to build credit firstcard 7 best credit cards to build credit in 2023 money what are the best store credit cards to build credit youtube credit cards to build credit history discover

:
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Instagram History Best Credit Cards To Build

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions How To Read Journal Article Date
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,13 @@ await nugetConfigPrompter.PromptToCreateOrUpdateAsync(
var appHostProjectDir = appHostProjects[0];
var serviceDefaultsProjectDir = serviceDefaultsProjects[0];

// Move the projects to the solution directory
// Copy the projects to the solution directory
// Using copy instead of move to support cross-drive operations on Windows
var finalAppHostDir = Path.Combine(initContext.SolutionDirectory.FullName, appHostProjectDir.Name);
var finalServiceDefaultsDir = Path.Combine(initContext.SolutionDirectory.FullName, serviceDefaultsProjectDir.Name);

Directory.Move(appHostProjectDir.FullName, finalAppHostDir);
Directory.Move(serviceDefaultsProjectDir.FullName, finalServiceDefaultsDir);
FileSystemHelper.CopyDirectory(appHostProjectDir.FullName, finalAppHostDir);
FileSystemHelper.CopyDirectory(serviceDefaultsProjectDir.FullName, finalServiceDefaultsDir);

Comment thread
mitchdenny marked this conversation as resolved.
var appHostProjectFile = new FileInfo(Path.Combine(finalAppHostDir, $"{appHostProjectDir.Name}.csproj"));
var serviceDefaultsProjectFile = new FileInfo(Path.Combine(finalServiceDefaultsDir, $"{serviceDefaultsProjectDir.Name}.csproj"));
Expand Down
51 changes: 51 additions & 0 deletions How To Launch A New Brand On Social Media
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace Aspire.Cli.Utils;

/// <summary>
/// Helper class for file system operations.
/// </summary>
internal static class FileSystemHelper
{
/// <summary>
/// Copies an entire directory and its contents to a new location.
/// </summary>
Comment thread
mitchdenny marked this conversation as resolved.
internal static void CopyDirectory(string sourceDir, string destinationDir)
Comment thread
mitchdenny marked this conversation as resolved.
{
ArgumentException.ThrowIfNullOrEmpty(sourceDir);
ArgumentException.ThrowIfNullOrEmpty(destinationDir);

var sourceDirInfo = new DirectoryInfo(sourceDir);
if (!sourceDirInfo.Exists)
{
throw new DirectoryNotFoundException($"Source directory not found: {sourceDir}");
}

// Use a stack to avoid recursion and potential stack overflow with deep directory structures
var stack = new Stack<(DirectoryInfo Source, string Destination)>();
stack.Push((sourceDirInfo, destinationDir));

while (stack.Count > 0)
{
var (currentSource, currentDestination) = stack.Pop();

// Create the destination directory if it doesn't exist
Directory.CreateDirectory(currentDestination);

// Copy all files in the current directory
foreach (var file in currentSource.GetFiles())
{
var targetFilePath = Path.Combine(currentDestination, file.Name);
file.CopyTo(targetFilePath, overwrite: false);
}

// Push all subdirectories onto the stack
foreach (var subDir in currentSource.GetDirectories())
{
var targetSubDir = Path.Combine(currentDestination, subDir.Name);
stack.Push((subDir, targetSubDir));
}
}
}
}
202 changes: 202 additions & 0 deletions News Section Layout Website
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using Aspire.Cli.Utils;

namespace Aspire.Cli.Tests.Utils;

public class FileSystemHelperTests(ITestOutputHelper outputHelper)
{
[Fact]
public void CopyDirectory_WithSimpleFiles_CopiesAllFiles()
{
// Arrange
using var workspace = TemporaryWorkspace.Create(outputHelper);
var sourceDir = workspace.CreateDirectory("source");
var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");

// Create some test files
File.WriteAllText(Path.Combine(sourceDir.FullName, "file1.txt"), "content1");
File.WriteAllText(Path.Combine(sourceDir.FullName, "file2.txt"), "content2");
File.WriteAllText(Path.Combine(sourceDir.FullName, "file3.cs"), "using System;");

// Act
FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir);

// Assert
Assert.True(Directory.Exists(destDir));
Assert.True(File.Exists(Path.Combine(destDir, "file1.txt")));
Assert.True(File.Exists(Path.Combine(destDir, "file2.txt")));
Assert.True(File.Exists(Path.Combine(destDir, "file3.cs")));

Assert.Equal("content1", File.ReadAllText(Path.Combine(destDir, "file1.txt")));
Assert.Equal("content2", File.ReadAllText(Path.Combine(destDir, "file2.txt")));
Assert.Equal("using System;", File.ReadAllText(Path.Combine(destDir, "file3.cs")));
}

[Fact]
public void CopyDirectory_WithSubdirectories_CopiesRecursively()
{
// Arrange
using var workspace = TemporaryWorkspace.Create(outputHelper);
var sourceDir = workspace.CreateDirectory("source");
var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");

// Create nested directory structure
var subDir1 = sourceDir.CreateSubdirectory("subdir1");
var subDir2 = subDir1.CreateSubdirectory("subdir2");

File.WriteAllText(Path.Combine(sourceDir.FullName, "root.txt"), "root content");
File.WriteAllText(Path.Combine(subDir1.FullName, "level1.txt"), "level 1 content");
File.WriteAllText(Path.Combine(subDir2.FullName, "level2.txt"), "level 2 content");

// Act
FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir);

// Assert
Assert.True(Directory.Exists(destDir));
Assert.True(File.Exists(Path.Combine(destDir, "root.txt")));
Assert.True(Directory.Exists(Path.Combine(destDir, "subdir1")));
Assert.True(File.Exists(Path.Combine(destDir, "subdir1", "level1.txt")));
Assert.True(Directory.Exists(Path.Combine(destDir, "subdir1", "subdir2")));
Assert.True(File.Exists(Path.Combine(destDir, "subdir1", "subdir2", "level2.txt")));

Assert.Equal("root content", File.ReadAllText(Path.Combine(destDir, "root.txt")));
Assert.Equal("level 1 content", File.ReadAllText(Path.Combine(destDir, "subdir1", "level1.txt")));
Assert.Equal("level 2 content", File.ReadAllText(Path.Combine(destDir, "subdir1", "subdir2", "level2.txt")));
}

[Fact]
public void CopyDirectory_WithEmptyDirectory_CreatesDestination()
{
// Arrange
using var workspace = TemporaryWorkspace.Create(outputHelper);
var sourceDir = workspace.CreateDirectory("empty_source");
var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "empty_destination");

// Act
FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir);

// Assert
Assert.True(Directory.Exists(destDir));
Assert.Empty(Directory.GetFiles(destDir));
Assert.Empty(Directory.GetDirectories(destDir));
}

[Fact]
public void CopyDirectory_WithNonExistentSource_ThrowsDirectoryNotFoundException()
{
// Arrange
using var workspace = TemporaryWorkspace.Create(outputHelper);
var nonExistentSource = Path.Combine(workspace.WorkspaceRoot.FullName, "nonexistent");
var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");

// Act & Assert
Assert.Throws<DirectoryNotFoundException>(() =>
FileSystemHelper.CopyDirectory(nonExistentSource, destDir));
}

[Fact]
public void CopyDirectory_WithNullSource_ThrowsArgumentNullException()
{
// Arrange
using var workspace = TemporaryWorkspace.Create(outputHelper);
var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");

// Act & Assert
Assert.Throws<ArgumentNullException>(() =>
FileSystemHelper.CopyDirectory(null!, destDir));
}

[Fact]
public void CopyDirectory_WithNullDestination_ThrowsArgumentNullException()
{
// Arrange
using var workspace = TemporaryWorkspace.Create(outputHelper);
var sourceDir = workspace.CreateDirectory("source");

// Act & Assert
Assert.Throws<ArgumentNullException>(() =>
FileSystemHelper.CopyDirectory(sourceDir.FullName, null!));
}

[Fact]
public void CopyDirectory_WithEmptySource_ThrowsArgumentException()
{
// Arrange
using var workspace = TemporaryWorkspace.Create(outputHelper);
var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");

// Act & Assert
Assert.Throws<ArgumentException>(() =>
FileSystemHelper.CopyDirectory(string.Empty, destDir));
}

[Fact]
public void CopyDirectory_WithEmptyDestination_ThrowsArgumentException()
{
// Arrange
using var workspace = TemporaryWorkspace.Create(outputHelper);
var sourceDir = workspace.CreateDirectory("source");

// Act & Assert
Assert.Throws<ArgumentException>(() =>
FileSystemHelper.CopyDirectory(sourceDir.FullName, string.Empty));
}

[Fact]
public void CopyDirectory_PreservesFileContent_WithBinaryFiles()
{
// Arrange
using var workspace = TemporaryWorkspace.Create(outputHelper);
var sourceDir = workspace.CreateDirectory("source");
var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");

// Create a binary file with random content
var binaryFilePath = Path.Combine(sourceDir.FullName, "binary.dat");
var randomBytes = new byte[1024];
Random.Shared.NextBytes(randomBytes);
File.WriteAllBytes(binaryFilePath, randomBytes);

// Act
FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir);

// Assert
var copiedFilePath = Path.Combine(destDir, "binary.dat");
Assert.True(File.Exists(copiedFilePath));

var copiedBytes = File.ReadAllBytes(copiedFilePath);
Assert.Equal(randomBytes, copiedBytes);
}

[Fact]
public void CopyDirectory_WithMultipleLevelsOfSubdirectories_CopiesAll()
{
// Arrange
using var workspace = TemporaryWorkspace.Create(outputHelper);
var sourceDir = workspace.CreateDirectory("source");
var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");

// Create a deep directory structure
var current = sourceDir;
for (int i = 0; i < 5; i++)
{
current = current.CreateSubdirectory($"level{i}");
File.WriteAllText(Path.Combine(current.FullName, $"file{i}.txt"), $"content at level {i}");
}

// Act
FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir);

// Assert
var currentDest = destDir;
for (int i = 0; i < 5; i++)
{
currentDest = Path.Combine(currentDest, $"level{i}");
Assert.True(Directory.Exists(currentDest));
var filePath = Path.Combine(currentDest, $"file{i}.txt");
Assert.True(File.Exists(filePath));
Assert.Equal($"content at level {i}", File.ReadAllText(filePath));
}
}
}
Loading