Files
UnrealEngineUWP/Engine/Source/Programs/Horde/Horde.Build/Utilities/ObjectIdHelpers.cs
Ben Marsh 4b0764eee2 Horde: Fix coding conventions within Horde.Build.
#preflight none

[CL 19482916 by Ben Marsh in ue5-main branch]
2022-03-23 14:50:23 -04:00

27 lines
435 B
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using MongoDB.Bson;
namespace Horde.Build.Utilities
{
static class ObjectIdHelpers
{
public static ObjectId ToObjectId(this string text)
{
if (text.Length == 0)
{
return ObjectId.Empty;
}
else
{
return ObjectId.Parse(text);
}
}
public static ObjectId<T> ToObjectId<T>(this string text)
{
return new ObjectId<T>(text.ToObjectId());
}
}
}