Brnkly.Raven.Admin.Controllers.BrnklyApiControllerBase.ThrowIfEtagDoesNotMatch C# (CSharp) Метод

ThrowIfEtagDoesNotMatch() защищенный Метод

protected ThrowIfEtagDoesNotMatch ( RavenConfig config, System.Guid originalEtag ) : void
config RavenConfig
originalEtag System.Guid
Результат void
        protected void ThrowIfEtagDoesNotMatch(RavenConfig config, Guid originalEtag)
        {
            var currentEtag = (config.Id == null) ?
                Guid.Empty :
                this.RavenSession.Advanced.GetEtagFor(config).Value;
            if (originalEtag != currentEtag)
            {
                throw new InvalidOperationException(
                    "The Raven config was modified by someone else or in a different browser window. " +
                    "Refresh the page to load the current version.");
            }
        }