This repository has been archived by the owner on Mar 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #168 from NuGet/dev
[ReleasePrep][2017.04.28]RI of dev into master
- Loading branch information
Showing
45 changed files
with
1,553 additions
and
99 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using VDS.RDF; | ||
|
||
namespace NuGet.Services.Metadata.Catalog | ||
{ | ||
/// <summary> | ||
/// An immutable graph supporting multi-threaded read-only access. According to dotNetRDF documentation, the | ||
/// <see cref="Graph"/> class is thread-safe when used in a read-only manner. | ||
/// <see cref="http://www.dotnetrdf.org/api/html/T_VDS_RDF_Graph.htm"/> | ||
/// </summary> | ||
public class ReadOnlyGraph : Graph | ||
{ | ||
private readonly bool _isReadOnly; | ||
|
||
public ReadOnlyGraph(IGraph graph) | ||
{ | ||
Merge(graph); | ||
_isReadOnly = true; | ||
} | ||
|
||
public override bool Assert(IEnumerable<Triple> ts) | ||
{ | ||
ThrowIfReadOnly(); | ||
return base.Assert(ts); | ||
} | ||
|
||
public override bool Assert(Triple t) | ||
{ | ||
ThrowIfReadOnly(); | ||
return base.Assert(t); | ||
} | ||
|
||
public override bool Retract(IEnumerable<Triple> ts) | ||
{ | ||
ThrowIfReadOnly(); | ||
return base.Retract(ts); | ||
} | ||
|
||
public override bool Retract(Triple t) | ||
{ | ||
ThrowIfReadOnly(); | ||
return base.Retract(t); | ||
} | ||
|
||
public override void Merge(IGraph g) | ||
{ | ||
ThrowIfReadOnly(); | ||
base.Merge(g); | ||
} | ||
|
||
public override void Merge(IGraph g, bool keepOriginalGraphUri) | ||
{ | ||
ThrowIfReadOnly(); | ||
base.Merge(g, keepOriginalGraphUri); | ||
} | ||
|
||
private void ThrowIfReadOnly() | ||
{ | ||
if (_isReadOnly) | ||
{ | ||
throw new NotSupportedException("This RDF graph cannot be modified."); | ||
} | ||
} | ||
} | ||
} |
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@echo OFF | ||
|
||
cd Ng | ||
|
||
:Top | ||
echo "Starting job - #{Jobs.ngcatalog2dnx.Title.Secondary}" | ||
|
||
title #{Jobs.ngcatalog2dnx.Title.Secondary} | ||
|
||
start /w Ng.exe catalog2dnx -source #{Jobs.ngcatalog2dnx.Catalog.Source.Secondary} -contentBaseAddress #{Jobs.ngcatalog2dnx.ContentBaseAddress.Secondary} -storageBaseAddress #{Jobs.ngcatalog2dnx.StorageBaseAddress.Secondary} -storageType azure -storageAccountName #{Jobs.common.v3.Storage.Secondary.Name} -storageKeyValue #{Jobs.common.v3.Storage.Secondary.Key} -storageContainer #{Jobs.ngcatalog2dnx.Container} -instrumentationkey #{Jobs.common.v3.Logging.InstrumentationKey} -vaultName #{Deployment.Azure.KeyVault.VaultName} -clientId #{Deployment.Azure.KeyVault.ClientId} -certificateThumbprint #{Deployment.Azure.KeyVault.CertificateThumbprint} -verbose true -interval #{Jobs.ngcatalog2dnx.Interval} | ||
|
||
echo "Finished #{Jobs.ngcatalog2dnx.Title.Secondary}" | ||
|
||
goto Top |
Oops, something went wrong.