mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
944 B
28 lines
944 B
// ==========================================================================
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex UG (haftungsbeschraenkt)
|
|
// All rights reserved. Licensed under the MIT license.
|
|
// ==========================================================================
|
|
|
|
using System;
|
|
using System.Globalization;
|
|
using Squidex.Infrastructure.EventSourcing;
|
|
|
|
namespace Squidex.Domain.Apps.Events
|
|
{
|
|
public static class SquidexHeaderExtensions
|
|
{
|
|
public static Guid AppId(this EnvelopeHeaders headers)
|
|
{
|
|
return headers[SquidexHeaders.AppId].ToGuid(CultureInfo.InvariantCulture);
|
|
}
|
|
|
|
public static Envelope<T> SetAppId<T>(this Envelope<T> envelope, Guid value) where T : class
|
|
{
|
|
envelope.Headers.Set(SquidexHeaders.AppId, value);
|
|
|
|
return envelope;
|
|
}
|
|
}
|
|
}
|
|
|