conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
[assembly: AssemblyInformationalVersion("6.0.1-alpha1")]
=======
[assembly: AssemblyInformationalVersion("6.0.0")]
#endif
>>>>>>>
[assembly: AssemblyInformationalVersion("6.0.1-alpha1")]
#endif |
<<<<<<<
_postBuffer1.SetCounterValue(0);
=======
_postBuffer.SetCounterValue(0);
_compute.SetFloat("_Threshold", _threshold);
>>>>>>>
_postBuffer1.SetCounterValue(0);
_compute.SetFloat("_Threshold", _threshold); |
<<<<<<<
groupKey.Name,
new BulkheadConfiguration
=======
>>>>>>>
<<<<<<<
mockLogFactory.Setup(m => m.CreateLog<BulkheadFactory>()).Returns(new DefaultMjolnirLog<BulkheadFactory>());
mockLogFactory.Setup(m => m.CreateLog<SemaphoreBulkheadHolder>()).Returns(new DefaultMjolnirLog<SemaphoreBulkheadHolder>());
=======
mockLogFactory.Setup(m => m.CreateLog(It.IsAny<Type>())).Returns(new DefaultMjolnirLog());
>>>>>>>
mockLogFactory.Setup(m => m.CreateLog<BulkheadFactory>()).Returns(new DefaultMjolnirLog<BulkheadFactory>());
mockLogFactory.Setup(m => m.CreateLog<SemaphoreBulkheadHolder>()).Returns(new DefaultMjolnirLog<SemaphoreBulkheadHolder>());
<<<<<<<
key.Name,
new BulkheadConfiguration
=======
>>>>>>>
<<<<<<<
groupKey.Name,
new BulkheadConfiguration
=======
>>>>>>>
<<<<<<<
mockConfig.UpdateBulkheadConfiguration(groupKey, new BulkheadConfiguration
{
MaxConcurrent = newExpectedCount
});
=======
mockConfig.BulkheadConfigurations = new Dictionary<string, BulkheadConfiguration>
{
{
groupKey.Name,
new BulkheadConfiguration
{
MaxConcurrent = newExpectedCount
}
}
};
mockConfig.NotifyAfterConfigUpdate();
>>>>>>>
mockConfig.BulkheadConfigurations = new Dictionary<string, BulkheadConfiguration>
{
{
groupKey.Name,
new BulkheadConfiguration
{
MaxConcurrent = newExpectedCount
}
}
};
mockConfig.NotifyAfterConfigUpdate();
<<<<<<<
key.Name,
new BulkheadConfiguration
=======
>>>>>>>
<<<<<<<
mockConfig.UpdateBulkheadConfiguration(key, new BulkheadConfiguration
{
MaxConcurrent = validMaxConcurrent
});
=======
mockConfig.BulkheadConfigurations = new Dictionary<string, BulkheadConfiguration>
{
{
key.Name,
new BulkheadConfiguration
{
MaxConcurrent = validMaxConcurrent
}
}
};
mockConfig.NotifyAfterConfigUpdate();
>>>>>>>
mockConfig.BulkheadConfigurations = new Dictionary<string, BulkheadConfiguration>
{
{
key.Name,
new BulkheadConfiguration
{
MaxConcurrent = validMaxConcurrent
}
}
};
mockConfig.NotifyAfterConfigUpdate(); |
<<<<<<<
public bool Equals2(in EquatableValue other) => Address != 0 && Address == other.Address;
public bool? Equals3(in EquatableValue other) => Address == 0 && other.Address == 0 ? (bool?)null : Address == other.Address;
public new int GetHashCode() => Address == 0 ? 0 : Address.GetHashCode();
=======
public bool Equals2(EquatableValue other) => Address != 0 && Address == other.Address;
public bool? Equals3(EquatableValue other) => Address == 0 && other.Address == 0 ? (bool?)null : Address == other.Address;
// Value must be stable, so we can't use Address (obj could get moved by the GC). It's used by dictionaries.
public new int GetHashCode() => Address == 0 ? 0 : type.AssemblyQualifiedName.GetHashCode();
>>>>>>>
public bool Equals2(in EquatableValue other) => Address != 0 && Address == other.Address;
public bool? Equals3(in EquatableValue other) => Address == 0 && other.Address == 0 ? (bool?)null : Address == other.Address;
// Value must be stable, so we can't use Address (obj could get moved by the GC). It's used by dictionaries.
public new int GetHashCode() => Address == 0 ? 0 : type.AssemblyQualifiedName.GetHashCode(); |
<<<<<<<
if (!(td is null)) {
var s = TypeFormatterUtils.GetNumberOfOverloadsString(td, method.Name);
if (!(s is null))
=======
if (td != null) {
var s = TypeFormatterUtils.GetNumberOfOverloadsString(td, method);
if (s != null)
>>>>>>>
if (!(td is null)) {
var s = TypeFormatterUtils.GetNumberOfOverloadsString(td, method);
if (!(s is null)) |
<<<<<<<
public override string Title => hexNode.ToString();
public override object? ToolTip => hexNode.ToString();
=======
public override string Title => hexNode.ToString(DocumentNodeWriteOptions.Title);
public override object ToolTip => hexNode.ToString(DocumentNodeWriteOptions.Title | DocumentNodeWriteOptions.ToolTip);
>>>>>>>
public override string Title => hexNode.ToString(DocumentNodeWriteOptions.Title);
public override object? ToolTip => hexNode.ToString(DocumentNodeWriteOptions.Title | DocumentNodeWriteOptions.ToolTip); |
<<<<<<<
public EditAssemblyVM(RawModuleBytesProvider rawModuleBytesProvider, IOpenFromGAC openFromGAC, IOpenAssembly openAssembly, ILanguageCompiler languageCompiler, IDecompiler decompiler, ModuleDef module)
: base(rawModuleBytesProvider, openFromGAC, openAssembly, languageCompiler, decompiler, module) => StartDecompile();
=======
public EditAssemblyVM(IRawModuleBytesProvider rawModuleBytesProvider, IOpenFromGAC openFromGAC, IOpenAssembly openAssembly, ILanguageCompiler languageCompiler, IDecompiler decompiler, ModuleDef module)
: base(rawModuleBytesProvider, openFromGAC, openAssembly, languageCompiler, decompiler, module, null) => StartDecompile();
>>>>>>>
public EditAssemblyVM(RawModuleBytesProvider rawModuleBytesProvider, IOpenFromGAC openFromGAC, IOpenAssembly openAssembly, ILanguageCompiler languageCompiler, IDecompiler decompiler, ModuleDef module)
: base(rawModuleBytesProvider, openFromGAC, openAssembly, languageCompiler, decompiler, module, null) => StartDecompile(); |
<<<<<<<
using System.Diagnostics;
using System.Text;
=======
>>>>>>>
using System.Diagnostics;
<<<<<<<
public DocumentTabContent? Create(IDocumentTabContentFactoryContext context) =>
new DecompileDocumentTabContent(this, context.Nodes, DecompilerService.Decompiler);
=======
public DocumentTabContent Create(IDocumentTabContentFactoryContext context) =>
new DecompileDocumentTabContent(this, context.Nodes, DecompilerService.Decompiler, decompilerTabContentContext);
>>>>>>>
public DocumentTabContent? Create(IDocumentTabContentFactoryContext context) =>
new DecompileDocumentTabContent(this, context.Nodes, DecompilerService.Decompiler, decompilerTabContentContext); |
<<<<<<<
this.wpfHexView = wpfHexView ?? throw new ArgumentNullException(nameof(wpfHexView));
=======
if (wpfHexView == null)
throw new ArgumentNullException(nameof(wpfHexView));
this.wpfHexView = wpfHexView;
Initialize();
>>>>>>>
this.wpfHexView = wpfHexView ?? throw new ArgumentNullException(nameof(wpfHexView));
Initialize(); |
<<<<<<<
Debug.Assert(td != null);
SelectType(td);
=======
Debug.Assert(!(td is null));
Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => {
var typeNode = DocumentTreeView.FindNode(td);
if (!(typeNode is null))
DocumentTreeView.TreeView.SelectItems(new[] { typeNode });
}));
>>>>>>>
Debug.Assert(!(td is null));
SelectType(td);
<<<<<<<
SelectType(td);
return;
}
if (e.Node is TypeReferenceNode typeRefNode) {
SelectType(typeRefNode.TypeRef.ResolveTypeDef());
return;
}
if (e.Node is MethodReferenceNode methodRefNode) {
SelectMethod(methodRefNode.MethodRef.ResolveMethodDef());
return;
}
if (e.Node is PropertyReferenceNode propertyRefNode) {
SelectMethod(propertyRefNode.PropertyRef.ResolveMethodDef());
return;
}
if (e.Node is EventReferenceNode eventRefNode) {
SelectMethod(eventRefNode.EventRef.ResolveMethodDef());
return;
}
if (e.Node is FieldReferenceNode fieldRefNode) {
SelectField(fieldRefNode.FieldRef.ResolveField());
=======
Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => {
var typeNode = DocumentTreeView.FindNode(td);
if (!(typeNode is null))
DocumentTreeView.TreeView.SelectItems(new[] { typeNode });
}));
>>>>>>>
SelectType(td);
return;
}
if (e.Node is TypeReferenceNode typeRefNode) {
SelectType(typeRefNode.TypeRef.ResolveTypeDef());
return;
}
if (e.Node is MethodReferenceNode methodRefNode) {
SelectMethod(methodRefNode.MethodRef.ResolveMethodDef());
return;
}
if (e.Node is PropertyReferenceNode propertyRefNode) {
SelectMethod(propertyRefNode.PropertyRef.ResolveMethodDef());
return;
}
if (e.Node is EventReferenceNode eventRefNode) {
SelectMethod(eventRefNode.EventRef.ResolveMethodDef());
return;
}
if (e.Node is FieldReferenceNode fieldRefNode) {
SelectField(fieldRefNode.FieldRef.ResolveField()); |
<<<<<<<
public bool Equals2(in EquatableValue other) => Address != 0 && Address == other.Address;
public bool? Equals3(in EquatableValue other) => Address == 0 && other.Address == 0 ? (bool?)null : Address == other.Address;
public new int GetHashCode() => Address == 0 ? 0 : Address.GetHashCode();
=======
public bool Equals2(EquatableValue other) => Address != 0 && Address == other.Address;
public bool? Equals3(EquatableValue other) => Address == 0 && other.Address == 0 ? (bool?)null : Address == other.Address;
// Value must be stable, so we can't use Address (obj could get moved by the GC). It's used by dictionaries.
public new int GetHashCode() => Address == 0 ? 0 : value?.Type.GetHashCode() ?? 0;
>>>>>>>
public bool Equals2(in EquatableValue other) => Address != 0 && Address == other.Address;
public bool? Equals3(in EquatableValue other) => Address == 0 && other.Address == 0 ? (bool?)null : Address == other.Address;
// Value must be stable, so we can't use Address (obj could get moved by the GC). It's used by dictionaries.
public new int GetHashCode() => Address == 0 ? 0 : value?.Type.GetHashCode() ?? 0; |
<<<<<<<
public override string Title => node.ToString();
public override object? ToolTip => node.ToString();
=======
public override string Title => node.ToString(DocumentNodeWriteOptions.Title);
public override object ToolTip => node.ToString(DocumentNodeWriteOptions.Title | DocumentNodeWriteOptions.ToolTip);
>>>>>>>
public override string Title => node.ToString(DocumentNodeWriteOptions.Title);
public override object? ToolTip => node.ToString(DocumentNodeWriteOptions.Title | DocumentNodeWriteOptions.ToolTip); |
<<<<<<<
/// <summary>
/// Verifies that the U+0000 characters are removed from the source data.
/// </summary>
[TestMethod]
[TestCategory("Other")]
public void Version()
{
var version = CommonMarkConverter.Version;
Assert.AreEqual(0, version.Major, "The version number is incorrect: {0}", version);
Assert.IsTrue(version.Minor > 5, "The version number is incorrect: {0}", version);
}
=======
[TestMethod]
[TestCategory("CommonMarkConverter")]
public void ConvertShortcutMethod()
{
var expected = "<p><strong>foo</strong></p>";
var result = CommonMarkConverter.Convert("**foo**");
// Assert
Helpers.LogValue("Expected", expected);
Helpers.LogValue("Actual", result);
Assert.AreEqual(Helpers.Tidy(expected), Helpers.Tidy(result));
}
>>>>>>>
/// <summary>
/// Verifies that the U+0000 characters are removed from the source data.
/// </summary>
[TestMethod]
[TestCategory("Other")]
public void Version()
{
var version = CommonMarkConverter.Version;
Assert.AreEqual(0, version.Major, "The version number is incorrect: {0}", version);
Assert.IsTrue(version.Minor > 5, "The version number is incorrect: {0}", version);
}
[TestMethod]
[TestCategory("CommonMarkConverter")]
public void ConvertShortcutMethod()
{
var expected = "<p><strong>foo</strong></p>";
var result = CommonMarkConverter.Convert("**foo**");
// Assert
Helpers.LogValue("Expected", expected);
Helpers.LogValue("Actual", result);
Assert.AreEqual(Helpers.Tidy(expected), Helpers.Tidy(result));
} |
<<<<<<<
var rowPtr = ResultsHandle.GetRow(index);
var rowHandle = Realm.CreateRowHandle(rowPtr, _realm.SharedRealmHandle);
return (T)(object)_realm.MakeObjectForRow(typeof(T), rowHandle);
=======
var row = NativeResults.get_row(ResultsHandle, (IntPtr)index);
var rowHandle = Realm.CreateRowHandle(row, _realm.SharedRealmHandle);
return (T)(object)_realm.MakeObjectForRow(ObjectSchema.Name, rowHandle);
>>>>>>>
var rowPtr = ResultsHandle.GetRow(index);
var rowHandle = Realm.CreateRowHandle(rowPtr, _realm.SharedRealmHandle);
return (T)(object)_realm.MakeObjectForRow(ObjectSchema.Name, rowHandle);
<<<<<<<
var tableHandle = _realm.Metadata[ElementType].Table;
return (int)NativeTable.CountAll(tableHandle);
=======
var tableHandle = _realm.Metadata[ObjectSchema.Name].Table;
return (int)NativeTable.count_all(tableHandle);
>>>>>>>
var tableHandle = _realm.Metadata[ObjectSchema.Name].Table;
return (int)NativeTable.CountAll(tableHandle); |
<<<<<<<
var wovenAtt = schema.Type.GetCustomAttribute<WovenAttribute>();
if (wovenAtt == null)
throw new RealmException($"Fody not properly installed. {schema.Type.FullName} is a RealmObject but has not been woven.");
var helper = (Weaving.IRealmObjectHelper)Activator.CreateInstance(wovenAtt.HelperType);
var properties = schema.ToDictionary(p => p.Name, p => NativeTable.GetColumnIndex(table, p.Name));
=======
Weaving.IRealmObjectHelper helper;
if (schema.Type != null)
{
var wovenAtt = schema.Type.GetCustomAttribute<WovenAttribute>();
if (wovenAtt == null)
throw new RealmException($"Fody not properly installed. {schema.Type.FullName} is a RealmObject but has not been woven.");
helper = (Weaving.IRealmObjectHelper)Activator.CreateInstance(wovenAtt.HelperType);
}
else
{
helper = Dynamic.DynamicRealmObjectHelper.Instance;
}
>>>>>>>
Weaving.IRealmObjectHelper helper;
if (schema.Type != null)
{
var wovenAtt = schema.Type.GetCustomAttribute<WovenAttribute>();
if (wovenAtt == null)
throw new RealmException($"Fody not properly installed. {schema.Type.FullName} is a RealmObject but has not been woven.");
helper = (Weaving.IRealmObjectHelper)Activator.CreateInstance(wovenAtt.HelperType);
}
else
{
helper = Dynamic.DynamicRealmObjectHelper.Instance;
}
<<<<<<<
var rowPtr = NativeTable.AddEmptyRow(metadata.Table);
var rowHandle = CreateRowHandle (rowPtr, SharedRealmHandle);
=======
var rowPtr = NativeTable.add_empty_row(metadata.Table);
var rowHandle = CreateRowHandle(rowPtr, SharedRealmHandle);
>>>>>>>
var rowPtr = NativeTable.AddEmptyRow(metadata.Table);
var rowHandle = CreateRowHandle(rowPtr, SharedRealmHandle);
<<<<<<<
var metadata = Metadata[tableType];
//IntPtr resultsPtr = NativeResults.create_for_table(SharedRealmHandle, metadata.Table, metadata.Schema.Handle);
var resultsPtr = NativeTable.CreateResults(metadata.Table, SharedRealmHandle, metadata.Schema.Handle);
=======
var metadata = Metadata[className];
IntPtr resultsPtr = NativeResults.create_for_table(SharedRealmHandle, metadata.Table, metadata.Schema.Handle);
>>>>>>>
var metadata = Metadata[className];
var resultsPtr = NativeTable.CreateResults(metadata.Table, SharedRealmHandle, metadata.Schema.Handle);
<<<<<<<
var objSchema = Metadata[tableType].Schema.Handle;
IntPtr resultsPtr = IntPtr.Zero;
=======
IntPtr resultsPtr = IntPtr.Zero;
>>>>>>>
var resultsPtr = IntPtr.Zero;
<<<<<<<
var result = new SortOrderHandle();
result.CreateForTable(Metadata[tableType].Table);
return result;
=======
var tableHandle = Metadata[className].Table;
IntPtr sortOrderPtr = NativeSortOrder.create_for_table(tableHandle);
return CreateSortOrderHandle(sortOrderPtr);
>>>>>>>
var result = new SortOrderHandle();
result.CreateForTable(Metadata[className].Table);
return result;
<<<<<<<
var tableHandle = Metadata[obj.GetType()].Table;
NativeTable.RemoveRow(tableHandle, (RowHandle)obj.RowHandle);
=======
var tableHandle = obj.ObjectMetadata.Table;
NativeTable.remove_row(tableHandle, (RowHandle)obj.RowHandle);
>>>>>>>
var tableHandle = obj.ObjectMetadata.Table;
NativeTable.RemoveRow(tableHandle, (RowHandle)obj.RowHandle);
<<<<<<<
var resultsHandle = MakeResultsForTable(@object.Type);
resultsHandle.Clear();
=======
var resultsHandle = MakeResultsForTable(@object.Name);
NativeResults.clear(resultsHandle);
>>>>>>>
var resultsHandle = MakeResultsForTable(@object.Name);
resultsHandle.Clear(); |
<<<<<<<
T GetValue<T>(IGroupHandle groupHandle, string tableName, string propertyName, long rowIndex);
void SetValue<T>(IGroupHandle groupHandle, string tableName, string propertyName, long rowIndex, T value);
IList<T> GetListValue<T>(IGroupHandle groupHandle, string tableName, string propertyName, long rowIndex);
void SetListValue<T>(IGroupHandle groupHandle, string tableName, string propertyName, long rowIndex, IList<T> value);
=======
void RemoveRow(IGroupHandle groupHandle, string tableName, IRowHandle rowHandle);
T GetValue<T>(IGroupHandle groupHandle, string tableName, string propertyName, IRowHandle rowHandle);
void SetValue<T>(IGroupHandle groupHandle, string tableName, string propertyName, IRowHandle rowHandle, T value);
>>>>>>>
void RemoveRow(IGroupHandle groupHandle, string tableName, IRowHandle rowHandle);
T GetValue<T>(IGroupHandle groupHandle, string tableName, string propertyName, IRowHandle rowHandle);
void SetValue<T>(IGroupHandle groupHandle, string tableName, string propertyName, IRowHandle rowHandle, T value);
IList<T> GetListValue<T>(IGroupHandle groupHandle, string tableName, string propertyName, IRowHandle rowHandle);
void SetListValue<T>(IGroupHandle groupHandle, string tableName, string propertyName, IRowHandle rowHandle, IList<T> value); |
<<<<<<<
[TestCase(1000000, 100), Explicit]
public void BindingPerformanceTest(int totalRecs, int recsPerTrans)
=======
[TearDown]
public void TearDown()
{
_realm.Close();
Realm.DeleteRealm(_realm.Config);
}
[TestCase(1000000), Explicit]
public void BindingPerformanceTest(int count)
>>>>>>>
[TearDown]
public void TearDown()
{
_realm.Close();
Realm.DeleteRealm(_realm.Config);
}
[TestCase(1000000, 100), Explicit]
public void BindingPerformanceTest(int totalRecs, int recsPerTrans) |
<<<<<<<
=======
var parameters = listParameters.ToArray();
var convertParameters = true;
if(new[] { "concat", "xconcat", "currentproperty"}.Contains(functionName))
{
convertParameters = false;
}
>>>>>>>
var parameters = listParameters.ToArray();
var convertParameters = true;
if (new[] { "concat", "xconcat", "currentproperty" }.Contains(functionName))
{
convertParameters = false;
}
<<<<<<<
{
var alias = ParseLoopAlias(listParameters, 1);
output = ReflectionHelper.Caller<T>(null, "JUST.Transformer`1", functionName, new object[] { array[alias], currentArrayElement[alias] }, true, Context);
}
=======
output = ReflectionHelper.Caller<T>(null, "JUST.Transformer`1", functionName, new object[] { array, currentArrayElement }, convertParameters, Context);
>>>>>>>
{
var alias = ParseLoopAlias(listParameters, 1);
output = ReflectionHelper.Caller<T>(null, "JUST.Transformer`1", functionName, new object[] { array[alias], currentArrayElement[alias] }, convertParameters, Context);
}
<<<<<<<
null,
"JUST.Transformer`1",
functionName,
new[] { array[alias], currentArrayElement[alias] }.Concat(listParameters.ToArray()).ToArray(),
true,
=======
null,
"JUST.Transformer`1",
functionName,
new [] { array, currentArrayElement }.Concat(parameters).ToArray(),
convertParameters,
>>>>>>>
null,
"JUST.Transformer`1",
functionName,
new[] { array[alias], currentArrayElement[alias] }.Concat(listParameters.ToArray()).ToArray(),
convertParameters,
<<<<<<<
{
var alias = ParseLoopAlias(listParameters, 1);
output = ReflectionHelper.Caller<T>(null, "JUST.Transformer`1", functionName,
new object[] { array[alias], currentArrayElement[alias], Context },
false, Context);
}
=======
output = ReflectionHelper.Caller<T>(null, "JUST.Transformer`1", functionName,
new object[] { array, currentArrayElement, Context },
convertParameters, Context);
>>>>>>>
{
var alias = ParseLoopAlias(listParameters, 1);
output = ReflectionHelper.Caller<T>(null, "JUST.Transformer`1", functionName,
new object[] { array[alias], currentArrayElement[alias], Context },
convertParameters, Context);
}
<<<<<<<
output = ReflectionHelper.InvokeCustomMethod<T>(methodInfo, listParameters.ToArray(), true, Context);
=======
output = ReflectionHelper.InvokeCustomMethod<T>(methodInfo, parameters, convertParameters, Context);
>>>>>>>
output = ReflectionHelper.InvokeCustomMethod<T>(methodInfo, parameters, convertParameters, Context);
<<<<<<<
output = ReflectionHelper.InvokeCustomMethod<T>(methodInfo, listParameters.ToArray(), true, Context);
=======
output = ReflectionHelper.InvokeCustomMethod<T>(methodInfo, parameters, convertParameters, Context);
>>>>>>>
output = ReflectionHelper.InvokeCustomMethod<T>(methodInfo, parameters, convertParameters, Context);
<<<<<<<
oParams[0] = listParameters.ToArray();
output = ReflectionHelper.Caller<T>(null, "JUST.Transformer`1", functionName, oParams, true, Context);
=======
oParams[0] = parameters;
output = ReflectionHelper.Caller<T>(null, "JUST.Transformer`1", functionName, oParams, convertParameters, Context);
>>>>>>>
oParams[0] = parameters;
output = ReflectionHelper.Caller<T>(null, "JUST.Transformer`1", functionName, oParams, convertParameters, Context);
<<<<<<<
output = ReflectionHelper.Caller<T>(null, "JUST.Transformer`1", functionName, listParameters.ToArray(), true, Context);
((JUSTContext)listParameters.Last()).Input = input;
=======
output = ReflectionHelper.Caller<T>(null, "JUST.Transformer`1", functionName, parameters, convertParameters, Context);
((JUSTContext)parameters.Last()).Input = input;
>>>>>>>
output = ReflectionHelper.Caller<T>(null, "JUST.Transformer`1", functionName, parameters, convertParameters, Context);
((JUSTContext)parameters.Last()).Input = input; |
<<<<<<<
else
=======
else if (property.Name.TrimStart().StartsWith("#eval"))
{
EvalOperation(property, parentArray, currentArrayToken, ref loopProperties, ref tokensToAdd);
}
else if (property.Name.TrimStart().Contains("#ifgroup"))
{
ConditionalGroupOperation(property, parentArray, currentArrayToken, ref condProps, ref tokenToForm, childToken);
isLoop = false;
}
else if (property.Name.TrimStart().Contains("#loop"))
{
LoopOperation(property, parentArray, currentArrayToken, ref loopProperties, ref arrayToForm, ref dictToForm, childToken);
isLoop = true;
}
else if (property.Value.ToString().Trim().StartsWith("#"))
>>>>>>>
else
<<<<<<<
//workaround: result should be an array if path ends up with array filter
if (typeof(T) == typeof(JsonPathSelectable) && arrayToken?.Type != JTokenType.Array && (Regex.IsMatch(strArrayToken ?? string.Empty, "\\[.+\\]$") || (currentArrayToken != null && currentArrayToken.ContainsKey(alias) && currentArrayToken[alias] != null && Regex.IsMatch(currentArrayToken[alias].Value<string>(), "\\[.+\\]$"))))
{
arrayToken = new JArray(arrayToken);
}
=======
>>>>>>>
//workaround: result should be an array if path ends up with array filter
if (typeof(T) == typeof(JsonPathSelectable) && arrayToken?.Type != JTokenType.Array && (Regex.IsMatch(strArrayToken ?? string.Empty, "\\[.+\\]$") || (currentArrayToken != null && currentArrayToken.ContainsKey(alias) && currentArrayToken[alias] != null && Regex.IsMatch(currentArrayToken[alias].Value<string>(), "\\[.+\\]$"))))
{
arrayToken = new JArray(arrayToken);
}
<<<<<<<
private void ConditionalGroupOperation(string propertyName, string arguments, IDictionary<string, JArray> parentArray, IDictionary<string, JToken> currentArrayToken, ref List<string> loopProperties, ref List<JToken> tokenToForm, JToken childToken)
=======
private void ConditionalGroupOperation(JProperty property, JArray parentArray, JToken currentArrayToken, ref List<string> condProps, ref List<JToken> tokenToForm, JToken childToken)
>>>>>>>
private void ConditionalGroupOperation(string propertyName, string arguments, IDictionary<string, JArray> parentArray, IDictionary<string, JToken> currentArrayToken, ref List<string> condProps, ref List<JToken> tokenToForm, JToken childToken)
<<<<<<<
loopProperties.Add(propertyName);
=======
condProps.Add(property.Name);
>>>>>>>
condProps.Add(propertyName);
<<<<<<<
loopProperties.Add(propertyName);
=======
condProps.Add(property.Name);
>>>>>>>
condProps.Add(propertyName); |
<<<<<<<
private static void RecursiveEvaluate(JToken parentToken, JArray parentArray, JToken currentArrayToken, JUSTContext localContext)
=======
private static void RecursiveEvaluate(JToken parentToken, string inputJson, JArray parentArray, JToken currentArrayToken, JUSTContext localContext)
>>>>>>>
private static void RecursiveEvaluate(JToken parentToken, JArray parentArray, JToken currentArrayToken, JUSTContext localContext)
<<<<<<<
List<object> itemsToAdd = new List<object>();
foreach (JToken arrEl in childToken.Children())
{
object itemToAdd = arrEl.Value<JToken>();
if (arrEl.Type == JTokenType.String && arrEl.ToString().Trim().StartsWith("#"))
{
object value = ParseFunction(arrEl.ToString(), parentArray, currentArrayToken, localContext);
itemToAdd = value;
}
itemsToAdd.Add(itemToAdd);
}
=======
>>>>>>> |
<<<<<<<
using System.Threading;
using System.Threading.Tasks;
=======
using System.Diagnostics.Contracts;
>>>>>>>
using System.Diagnostics.Contracts;
using System.Threading;
using System.Threading.Tasks; |
<<<<<<<
//以下是斗地主服务端自定义全局组件
//GateGlobalComponent
Game.Scene.AddComponent<UserComponent>();
Game.Scene.AddComponent<LandlordsGateSessionKeyComponent>();
//MapGlobalComponent
Game.Scene.AddComponent<RoomComponent>();
//MatchGlobalComponent
Game.Scene.AddComponent<AllotMapComponent>();
Game.Scene.AddComponent<MatchComponent>();
Game.Scene.AddComponent<MatcherComponent>();
Game.Scene.AddComponent<MatchRoomComponent>();
//RealmGlobalComponent
Game.Scene.AddComponent<OnlineComponent>();
break;
=======
Game.Scene.AddComponent<ActorManagerComponent>();
// Game.Scene.AddComponent<HttpComponent>();
break;
>>>>>>>
Game.Scene.AddComponent<ActorManagerComponent>();
// Game.Scene.AddComponent<HttpComponent>();
//以下是斗地主服务端自定义全局组件
//GateGlobalComponent
Game.Scene.AddComponent<UserComponent>();
Game.Scene.AddComponent<LandlordsGateSessionKeyComponent>();
//MapGlobalComponent
Game.Scene.AddComponent<RoomComponent>();
//MatchGlobalComponent
Game.Scene.AddComponent<AllotMapComponent>();
Game.Scene.AddComponent<MatchComponent>();
Game.Scene.AddComponent<MatcherComponent>();
Game.Scene.AddComponent<MatchRoomComponent>();
//RealmGlobalComponent
Game.Scene.AddComponent<OnlineComponent>();
break; |
<<<<<<<
=======
ETModel_GlobalConfigComponent_Binding.Register(app);
ETModel_GlobalProto_Binding.Register(app);
ETModel_NetworkHelper_Binding.Register(app);
UnityEngine_UI_InputField_Binding.Register(app);
ETModel_NetworkComponent_Binding.Register(app);
ETModel_ComponentFactory_Binding.Register(app);
ILRuntime.CLR.TypeSystem.CLRType __clrType = null;
}
/// <summary>
/// Release the CLR binding, please invoke this BEFORE ILRuntime Appdomain destroy
/// </summary>
public static void Shutdown(ILRuntime.Runtime.Enviorment.AppDomain app)
{
>>>>>>>
ILRuntime.CLR.TypeSystem.CLRType __clrType = null;
}
/// <summary>
/// Release the CLR binding, please invoke this BEFORE ILRuntime Appdomain destroy
/// </summary>
public static void Shutdown(ILRuntime.Runtime.Enviorment.AppDomain app)
{ |
<<<<<<<
private Dictionary<int, StartConfig> configDict;
=======
private Dictionary<int, StartConfig> configDict;
private Dictionary<int, IPEndPoint> innerAddressDict = new Dictionary<int, IPEndPoint>();
public StartConfig StartConfig { get; private set; }
>>>>>>>
private Dictionary<int, StartConfig> configDict;
private Dictionary<int, IPEndPoint> innerAddressDict = new Dictionary<int, IPEndPoint>();
<<<<<<<
public List<StartConfig> GateConfigs { get; private set; }
=======
string[] ss = File.ReadAllText(path).Split('\n');
foreach (string s in ss)
{
string s2 = s.Trim();
if (s2 == "")
{
continue;
}
try
{
StartConfig startConfig = MongoHelper.FromJson<StartConfig>(s2);
this.configDict.Add(startConfig.AppId, startConfig);
InnerConfig innerConfig = startConfig.GetComponent<InnerConfig>();
if (innerConfig != null)
{
this.innerAddressDict.Add(startConfig.AppId, innerConfig.IPEndPoint);
}
if (startConfig.AppType.Is(AppType.Realm))
{
this.RealmConfig = startConfig;
}
if (startConfig.AppType.Is(AppType.Location))
{
this.LocationConfig = startConfig;
}
if (startConfig.AppType.Is(AppType.DB))
{
this.DBConfig = startConfig;
}
if (startConfig.AppType.Is(AppType.Map))
{
this.MapConfigs.Add(startConfig);
}
if (startConfig.AppType.Is(AppType.Gate))
{
this.GateConfigs.Add(startConfig);
}
}
catch (Exception e)
{
Log.Error($"config错误: {s2} {e}");
}
}
>>>>>>>
public List<StartConfig> GateConfigs { get; private set; }
<<<<<<<
public StartConfig Get(int id)
{
try
{
return this.configDict[id];
}
catch (Exception e)
{
throw new Exception($"not found startconfig: {id}", e);
}
}
public StartConfig[] GetAll()
{
return this.configDict.Values.ToArray();
}
public int Count
{
get
{
return this.configDict.Count;
}
}
}
=======
public StartConfig Get(int id)
{
try
{
return this.configDict[id];
}
catch (Exception e)
{
throw new Exception($"not found startconfig: {id}", e);
}
}
public IPEndPoint GetInnerAddress(int id)
{
try
{
return this.innerAddressDict[id];
}
catch (Exception e)
{
throw new Exception($"not found innerAddress: {id}", e);
}
}
public StartConfig[] GetAll()
{
return this.configDict.Values.ToArray();
}
public int Count
{
get
{
return this.configDict.Count;
}
}
}
>>>>>>>
public StartConfig Get(int id)
{
try
{
return this.configDict[id];
}
catch (Exception e)
{
throw new Exception($"not found startconfig: {id}", e);
}
}
public IPEndPoint GetInnerAddress(int id)
{
try
{
return this.innerAddressDict[id];
}
catch (Exception e)
{
throw new Exception($"not found innerAddress: {id}", e);
}
}
public StartConfig[] GetAll()
{
return this.configDict.Values.ToArray();
}
public int Count
{
get
{
return this.configDict.Count;
}
}
} |
<<<<<<<
=======
System_Collections_Generic_Dictionary_2_Type_Queue_1_Object_Binding.Register(app);
System_Collections_Generic_Queue_1_Object_Binding.Register(app);
ETModel_SessionCallbackComponent_Binding.Register(app);
>>>>>>>
System_Collections_Generic_Dictionary_2_Type_Queue_1_Object_Binding.Register(app);
System_Collections_Generic_Queue_1_Object_Binding.Register(app);
<<<<<<<
ETModel_Packet_Binding.Register(app);
=======
System_Action_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding.Register(app);
ETModel_Component_Binding.Register(app);
ETModel_NetworkComponent_Binding.Register(app);
>>>>>>>
System_Action_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding.Register(app);
<<<<<<<
=======
Google_Protobuf_MessageParser_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding.Register(app);
Google_Protobuf_Collections_RepeatedField_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding.Register(app);
Google_Protobuf_Collections_RepeatedField_1_String_Binding.Register(app);
Google_Protobuf_Collections_RepeatedField_1_Int32_Binding.Register(app);
Google_Protobuf_Collections_RepeatedField_1_Int64_Binding.Register(app);
Google_Protobuf_FieldCodec_Binding.Register(app);
UnityEngine_Object_Binding.Register(app);
>>>>>>>
Google_Protobuf_MessageParser_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding.Register(app);
Google_Protobuf_Collections_RepeatedField_1_String_Binding.Register(app);
Google_Protobuf_Collections_RepeatedField_1_Int32_Binding.Register(app);
Google_Protobuf_Collections_RepeatedField_1_Int64_Binding.Register(app);
Google_Protobuf_FieldCodec_Binding.Register(app); |
<<<<<<<
ETModel_Entity_Binding.Register(app);
ETModel_Game_Binding.Register(app);
ETModel_ClientComponent_Binding.Register(app);
ETModel_Component_Binding.Register(app);
ETModel_User_Binding.Register(app);
UnityEngine_LayerMask_Binding.Register(app);
UnityEngine_Input_Binding.Register(app);
UnityEngine_Camera_Binding.Register(app);
UnityEngine_Physics_Binding.Register(app);
UnityEngine_RaycastHit_Binding.Register(app);
ETModel_SessionComponent_Binding.Register(app);
ETModel_Frame_ClickMap_Binding.Register(app);
UnityEngine_Vector3_Binding.Register(app);
ETModel_Session_Binding.Register(app);
System_Runtime_CompilerServices_AsyncVoidMethodBuilder_Binding.Register(app);
System_Threading_Tasks_Task_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding.Register(app);
System_Runtime_CompilerServices_TaskAwaiter_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding.Register(app);
ETModel_ResourcesComponent_Binding.Register(app);
ETModel_Actor_CreateUnits_Binding.Register(app);
Google_Protobuf_Collections_RepeatedField_1_UnitInfo_Binding.Register(app);
System_Collections_Generic_IEnumerator_1_UnitInfo_Binding.Register(app);
ETModel_UnitInfo_Binding.Register(app);
ETModel_UnitComponent_Binding.Register(app);
ETModel_UnitFactory_Binding.Register(app);
ETModel_Unit_Binding.Register(app);
VInt3_Binding.Register(app);
ETModel_PlayerComponent_Binding.Register(app);
ETModel_Player_Binding.Register(app);
ETModel_ComponentWithId_Binding.Register(app);
ETModel_CameraComponent_Binding.Register(app);
System_Collections_IEnumerator_Binding.Register(app);
System_IDisposable_Binding.Register(app);
ETModel_Actor_Test_Binding.Register(app);
ETModel_MoveComponent_Binding.Register(app);
System_Collections_Generic_Dictionary_2_Int64_Int32_Binding.Register(app);
UnityEngine_UI_Text_Binding.Register(app);
UnityEngine_Component_Binding.Register(app);
UnityEngine_GameObject_Binding.Register(app);
ETModel_GameObjectHelper_Binding.Register(app);
UnityEngine_Object_Binding.Register(app);
System_Type_Binding.Register(app);
System_Enum_Binding.Register(app);
UnityEngine_UI_Image_Binding.Register(app);
System_Int64_Binding.Register(app);
ETModel_Card_Binding.Register(app);
System_Collections_Generic_Dictionary_2_String_GameObject_Binding.Register(app);
System_Int32_Binding.Register(app);
System_Collections_Generic_IEnumerable_1_Card_Binding.Register(app);
System_Collections_Generic_IEnumerator_1_Card_Binding.Register(app);
System_Collections_Generic_ICollection_1_Card_Binding.Register(app);
System_Collections_Generic_List_1_Card_Binding.Register(app);
UnityEngine_RectTransform_Binding.Register(app);
UnityEngine_Vector2_Binding.Register(app);
UnityEngine_Transform_Binding.Register(app);
ETModel_HandCardSprite_Binding.Register(app);
Google_Protobuf_Collections_RepeatedField_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding.Register(app);
System_Collections_Generic_IEnumerator_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding.Register(app);
System_Collections_Generic_List_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding.Register(app);
Google_Protobuf_Collections_RepeatedField_1_Card_Binding.Register(app);
ReferenceCollector_Binding.Register(app);
UnityEngine_UI_Button_Binding.Register(app);
ETModel_ActionHelper_Binding.Register(app);
ETModel_GlobalConfigComponent_Binding.Register(app);
ETModel_GlobalProto_Binding.Register(app);
ETModel_NetworkHelper_Binding.Register(app);
ETModel_NetworkComponent_Binding.Register(app);
ETModel_SessionCallbackComponent_Binding.Register(app);
UnityEngine_UI_InputField_Binding.Register(app);
ETModel_ComponentFactory_Binding.Register(app);
UnityEngine_Color_Binding.Register(app);
UnityEngine_UI_Graphic_Binding.Register(app);
System_Collections_Generic_Dictionary_2_Type_ILTypeInstance_Binding.Register(app);
System_Collections_Generic_List_1_Type_Binding.Register(app);
System_Collections_Generic_List_1_Type_Binding_Enumerator_Binding.Register(app);
System_Reflection_MemberInfo_Binding.Register(app);
System_Activator_Binding.Register(app);
UnityEngine_TextAsset_Binding.Register(app);
=======
>>>>>>>
<<<<<<<
=======
ETModel_DoubleMap_2_UInt16_Type_Binding.Register(app);
System_Collections_Generic_Dictionary_2_UInt16_Object_Binding.Register(app);
ETModel_MessageAttribute_Binding.Register(app);
ETModel_SessionCallbackComponent_Binding.Register(app);
>>>>>>>
ETModel_DoubleMap_2_UInt16_Type_Binding.Register(app);
System_Collections_Generic_Dictionary_2_UInt16_Object_Binding.Register(app);
ETModel_MessageAttribute_Binding.Register(app);
<<<<<<<
=======
ETModel_NetworkComponent_Binding.Register(app);
>>>>>>>
<<<<<<<
=======
System_Collections_Generic_Dictionary_2_String_ILTypeInstance_Binding_ValueCollection_Binding.Register(app);
System_Collections_Generic_Dictionary_2_String_ILTypeInstance_Binding_ValueCollection_Binding_Enumerator_Binding.Register(app);
UnityEngine_GameObject_Binding.Register(app);
UnityEngine_Transform_Binding.Register(app);
UnityEngine_Component_Binding.Register(app);
>>>>>>>
System_Collections_Generic_Dictionary_2_String_ILTypeInstance_Binding_ValueCollection_Binding.Register(app);
System_Collections_Generic_Dictionary_2_String_ILTypeInstance_Binding_ValueCollection_Binding_Enumerator_Binding.Register(app);
<<<<<<<
ETModel_Scene_Binding.Register(app);
Google_Protobuf_ProtoPreconditions_Binding.Register(app);
Google_Protobuf_CodedOutputStream_Binding.Register(app);
Google_Protobuf_CodedInputStream_Binding.Register(app);
Google_Protobuf_MessageParser_1_Google_Protobuf_Adapt_IMessage_Binding_Adaptor_Binding.Register(app);
Google_Protobuf_Collections_RepeatedField_1_String_Binding.Register(app);
Google_Protobuf_Collections_RepeatedField_1_Int32_Binding.Register(app);
Google_Protobuf_Collections_RepeatedField_1_Int64_Binding.Register(app);
Google_Protobuf_FieldCodec_Binding.Register(app);
System_Collections_Generic_Dictionary_2_String_ILTypeInstance_Binding_ValueCollection_Binding.Register(app);
System_Collections_Generic_Dictionary_2_String_ILTypeInstance_Binding_ValueCollection_Binding_Enumerator_Binding.Register(app);
=======
ReferenceCollector_Binding.Register(app);
UnityEngine_UI_Button_Binding.Register(app);
ETModel_ActionHelper_Binding.Register(app);
>>>>>>>
<<<<<<<
=======
UnityEngine_UI_InputField_Binding.Register(app);
ETModel_GlobalConfigComponent_Binding.Register(app);
ETModel_GlobalProto_Binding.Register(app);
ETModel_ComponentFactory_Binding.Register(app);
>>>>>>> |
<<<<<<<
AllServer = Manager | Realm | Gate | Http | DB | Location | Map | Match
}
=======
AllServer = Manager | Realm | Gate | Http | DB | Location | Map | BenchmarkWebsocketServer
}
>>>>>>>
AllServer = Manager | Realm | Gate | Http | DB | Location | Map | BenchmarkWebsocketServer | Match
} |
<<<<<<<
using System;
using AustinHarris.JsonRpc;
using Microsoft.VisualStudio.TestTools.UnitTesting;
=======
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using AustinHarris.JsonRpc.Client;
using AustinHarris.JsonRpc;
using Newtonsoft.Json.Linq;
>>>>>>>
using System;
using AustinHarris.JsonRpc;
using Microsoft.VisualStudio.TestTools.UnitTesting;
<<<<<<<
}
[TestMethod]
public void TestOptionalParametersBoolsAndStrings()
{
string request =
"{\"jsonrpc\":\"2.0\",\"method\":\"TestOptionalParametersBoolsAndStrings\",\"params\":{\"input1\":\"murkel\"},\"Id\":1}";
string expectedResult = "{\"jsonrpc\":\"2.0\",\"result\":true,\"id\":1}";
var result = JsonRpcProcessor.Process(request);
result.Wait();
Assert.IsFalse(result.Result.Contains("error"));
Assert.AreEqual(expectedResult, result.Result);
}
[TestMethod]
public void TestBatchResult()
{
string request =
@"[{},{""jsonrpc"":""2.0"",""id"":4},{""jsonrpc"":""2.0"",""method"":""ReturnsDateTime"",""params"":{},""id"":1},{""jsonrpc"":""2.0"",""method"":""Notify"",""params"":[""Hello World!""]}]";
var result = JsonRpcProcessor.Process(request);
result.Wait();
Assert.IsFalse(result.Result.EndsWith(@",]"), "result.Result.EndsWith(@',]')");
}
=======
}
[TestMethod]
public void TestBatchResult()
{
string request =
@"[{},{""jsonrpc"":""2.0"",""id"":4},{""jsonrpc"":""2.0"",""method"":""ReturnsDateTime"",""params"":{},""id"":1},{""jsonrpc"":""2.0"",""method"":""Notify"",""params"":[""Hello World!""]}]";
var result = JsonRpcProcessor.Process(request);
result.Wait();
Assert.IsFalse(result.Result.EndsWith(@",]"), "result.Result.EndsWith(@',]')");
var parsedArray = JArray.Parse(result.Result);
//var parsed = JObject.Parse(result.Result);
}
>>>>>>>
}
[TestMethod]
public void TestOptionalParametersBoolsAndStrings()
{
string request =
"{\"jsonrpc\":\"2.0\",\"method\":\"TestOptionalParametersBoolsAndStrings\",\"params\":{\"input1\":\"murkel\"},\"Id\":1}";
string expectedResult = "{\"jsonrpc\":\"2.0\",\"result\":true,\"id\":1}";
var result = JsonRpcProcessor.Process(request);
result.Wait();
Assert.IsFalse(result.Result.Contains("error"));
Assert.AreEqual(expectedResult, result.Result);
}
[TestMethod]
public void TestBatchResult()
{
string request =
@"[{},{""jsonrpc"":""2.0"",""id"":4},{""jsonrpc"":""2.0"",""method"":""ReturnsDateTime"",""params"":{},""id"":1},{""jsonrpc"":""2.0"",""method"":""Notify"",""params"":[""Hello World!""]}]";
var result = JsonRpcProcessor.Process(request);
result.Wait();
Assert.IsFalse(result.Result.EndsWith(@",]"), "result.Result.EndsWith(@',]')");
} |
<<<<<<<
public static Variable MakeStr(string str) {
return Kernel.BoxAnyMO(str, Kernel.StrMO);
}
=======
public static Variable MakeComplex(Complex z) {
return Kernel.BoxAnyMO<Complex>(z, Kernel.ComplexMO);
}
>>>>>>>
public static Variable MakeStr(string str) {
return Kernel.BoxAnyMO(str, Kernel.StrMO);
}
public static Variable MakeComplex(Complex z) {
return Kernel.BoxAnyMO<Complex>(z, Kernel.ComplexMO);
} |
<<<<<<<
private const string BF_DESERIALIZE = "System.Runtime.Serialization.Formatters.Binary.BinaryFormatter::Deserialize";
private const string DC_JSON_READ_OBJ = "System.Runtime.Serialization.Json.DataContractJsonSerializer::ReadObject";
private const string DC_XML_READ_OBJ = "System.Runtime.Serialization.Xml.DataContractSerializer::ReadObject";
private const string JS_SERIALIZER_DESERIALIZE = "System.Web.Script.Serialization.JavaScriptSerializer::Deserialize";
private const string LOS_FORMATTER_DESERIALIZE = "System.Web.UI.LosFormatter::Deserialize";
private const string NET_DATA_CONTRACT_READ_OBJ = "System.Runtime.Serialization.NetDataContractSerializer::ReadObject";
private const string NET_DATA_CONTRACT_DESERIALIZE = "System.Runtime.Serialization.NetDataContractSerializer::Deserialize";
private const string OBJ_STATE_FORMATTER_DESERIALIZE = "System.Web.UI.ObjectStateFormatter::Deserialize";
private const string SOAP_FORMATTER_DESERIALIZE = "System.Runtime.Serialization.Formatters.Soap.SoapFormatter::Deserialize";
private const string XML_SERIALIZER_DESERIALIZE = "System.Xml.Serialization.XmlSerializer::Deserialize";
private const string REGISTER_CHANNEL = "System.Runtime.Remoting.Channels.ChannelServices::RegisterChannel";
private const string WCF_SERVER_STRING = "System.ServiceModel.ServiceHost::AddServiceEndpoint";
private const string WCF_CLIENT_STRING = "System.ServiceModel.ChannelFactory::CreateChannel";
private static string[] wcfServerGadgetNames = { WCF_SERVER_STRING };
static Dictionary<string, object> ArgParser(string[] args)
{
Dictionary<string, object> result = new Dictionary<string, object>();
foreach(string arg in args)
{
if (!arg.Contains("="))
{
Console.WriteLine("Argument '{0}' is not of format 'key=val'. Skipping.", arg);
continue;
}
string[] parts = arg.Split(new char[] { '=' }, 2);
if (parts.Length != 2)
{
Console.WriteLine("Argument '{0}' contained an empty value. Skipping.", arg);
continue;
}
result[parts[0].ToLower()] = parts[1];
}
if (!result.ContainsKey("path") && !result.ContainsKey("pid"))
throw new Exception("Not enough arguments given. Must be passed 'path' or 'pid' to parse.");
if (result.ContainsKey("path") && result.ContainsKey("pid"))
{
throw new Exception("Must be passed path or pid as arguments, not both.");
}
if (result.ContainsKey("path"))
{
string path = result["path"].ToString();
if ((path.StartsWith("'") && path.EndsWith("'")) ||
(path.StartsWith("\"") && path.EndsWith("\"")))
{
path = path.Substring(1, path.Length - 2);
result["path"] = path;
}
if (!File.Exists((string)result["path"]) && !Directory.Exists((string)result["path"]))
throw new Exception(String.Format("File or directory {0} does not exist.", result["path"]));
} else
{
string pids = (string)result["pid"];
if (pids.Contains(","))
{
var pidInts = pids.Split(',');
List<int> pidList = new List<int>();
foreach(var pid in pidInts)
{
if (int.TryParse(pid, out int iRes))
{
pidList.Add(iRes);
}
}
result["pid"] = pidList.ToArray();
} else if (result["pid"].ToString().ToLower() != "all")
{
if (int.TryParse(result["pid"].ToString(), out int iRes))
{
result["pid"] = iRes;
} else
{
throw new Exception(string.Format("Given invalid pid: {0}. Argument 'pid' must be one of integer, integer list, or value 'all'.", result["pid"].ToString()));
}
}
}
return result;
}
static AssemblyGadgetAnalysis InspectAssembly(string path)
{
string targetAssembly = path;
// Make sure that the target is actually an assembly before we get started
AssemblyName assemblyName = AssemblyName.GetAssemblyName(targetAssembly);
return AnalyzeAssembly(targetAssembly);
}
static string Usage()
{
return @"
Example Usage:
InspectAssembly.exe path=""C:\Windows\System32\powershell.exe""
InspectAssembly.exe path=""C:\Windows\System32\""
InspectAssembly.exe pid=12044
InspectAssembly.exe pid=12044,12300 outfile=proc_analysis.txt
InspectAssembly.exe pid=all
Arguments:
path - A path to a .NET binary to analyze, or a directory containing .NET assemblies.
pid - An integer or comma-separated list of integers to analyze.
If the keyword 'all' is passed, then all processes are analyzed.
outfile - File to write results to.
";
}
=======
>>>>>>>
private const string BF_DESERIALIZE = "System.Runtime.Serialization.Formatters.Binary.BinaryFormatter::Deserialize";
private const string DC_JSON_READ_OBJ = "System.Runtime.Serialization.Json.DataContractJsonSerializer::ReadObject";
private const string DC_XML_READ_OBJ = "System.Runtime.Serialization.Xml.DataContractSerializer::ReadObject";
private const string JS_SERIALIZER_DESERIALIZE = "System.Web.Script.Serialization.JavaScriptSerializer::Deserialize";
private const string LOS_FORMATTER_DESERIALIZE = "System.Web.UI.LosFormatter::Deserialize";
private const string NET_DATA_CONTRACT_READ_OBJ = "System.Runtime.Serialization.NetDataContractSerializer::ReadObject";
private const string NET_DATA_CONTRACT_DESERIALIZE = "System.Runtime.Serialization.NetDataContractSerializer::Deserialize";
private const string OBJ_STATE_FORMATTER_DESERIALIZE = "System.Web.UI.ObjectStateFormatter::Deserialize";
private const string SOAP_FORMATTER_DESERIALIZE = "System.Runtime.Serialization.Formatters.Soap.SoapFormatter::Deserialize";
private const string XML_SERIALIZER_DESERIALIZE = "System.Xml.Serialization.XmlSerializer::Deserialize";
private const string REGISTER_CHANNEL = "System.Runtime.Remoting.Channels.ChannelServices::RegisterChannel";
private const string WCF_SERVER_STRING = "System.ServiceModel.ServiceHost::AddServiceEndpoint";
private const string WCF_CLIENT_STRING = "System.ServiceModel.ChannelFactory::CreateChannel";
private static string[] wcfServerGadgetNames = { WCF_SERVER_STRING };
static Dictionary<string, object> ArgParser(string[] args)
{
Dictionary<string, object> result = new Dictionary<string, object>();
foreach(string arg in args)
{
if (!arg.Contains("="))
{
Console.WriteLine("Argument '{0}' is not of format 'key=val'. Skipping.", arg);
continue;
}
string[] parts = arg.Split(new char[] { '=' }, 2);
if (parts.Length != 2)
{
Console.WriteLine("Argument '{0}' contained an empty value. Skipping.", arg);
continue;
}
result[parts[0].ToLower()] = parts[1];
}
if (!result.ContainsKey("path") && !result.ContainsKey("pid"))
throw new Exception("Not enough arguments given. Must be passed 'path' or 'pid' to parse.");
if (result.ContainsKey("path") && result.ContainsKey("pid"))
{
throw new Exception("Must be passed path or pid as arguments, not both.");
}
if (result.ContainsKey("path"))
{
string path = result["path"].ToString();
if ((path.StartsWith("'") && path.EndsWith("'")) ||
(path.StartsWith("\"") && path.EndsWith("\"")))
{
path = path.Substring(1, path.Length - 2);
result["path"] = path;
}
if (!File.Exists((string)result["path"]) && !Directory.Exists((string)result["path"]))
throw new Exception(String.Format("File or directory {0} does not exist.", result["path"]));
} else
{
string pids = (string)result["pid"];
if (pids.Contains(","))
{
var pidInts = pids.Split(',');
List<int> pidList = new List<int>();
foreach(var pid in pidInts)
{
if (int.TryParse(pid, out int iRes))
{
pidList.Add(iRes);
}
}
result["pid"] = pidList.ToArray();
} else if (result["pid"].ToString().ToLower() != "all")
{
if (int.TryParse(result["pid"].ToString(), out int iRes))
{
result["pid"] = iRes;
} else
{
throw new Exception(string.Format("Given invalid pid: {0}. Argument 'pid' must be one of integer, integer list, or value 'all'.", result["pid"].ToString()));
}
}
}
return result;
}
static AssemblyGadgetAnalysis InspectAssembly(string path)
{
string targetAssembly = path;
// Make sure that the target is actually an assembly before we get started
AssemblyName assemblyName = AssemblyName.GetAssemblyName(targetAssembly);
return AnalyzeAssembly(targetAssembly);
}
static string Usage()
{
return @"
Example Usage:
InspectAssembly.exe path=""C:\Windows\System32\powershell.exe""
InspectAssembly.exe path=""C:\Windows\System32\""
InspectAssembly.exe pid=12044
InspectAssembly.exe pid=12044,12300 outfile=proc_analysis.txt
InspectAssembly.exe pid=all
Arguments:
path - A path to a .NET binary to analyze, or a directory containing .NET assemblies.
pid - An integer or comma-separated list of integers to analyze.
If the keyword 'all' is passed, then all processes are analyzed.
outfile - File to write results to.
";
}
<<<<<<<
List<GadgetItem> listGadgets = new List<GadgetItem>();
=======
>>>>>>>
List<GadgetItem> listGadgets = new List<GadgetItem>();
<<<<<<<
case string x when x.Contains(REGISTER_CHANNEL):
isRemoting = true;
gadgetName = REGISTER_CHANNEL;
remotingChannel = dnrChannel[5];
=======
case string x when x.Contains("System.Runtime.Remoting.Channels.ChannelServices::RegisterChannel"):
Console.WriteLine("[+] Assembly registers a .NET Remoting channel ({0}) in {1}.{2}", dnrChannel[5], method.t.Name, method.m.Name);
>>>>>>>
case string x when x.Contains(REGISTER_CHANNEL):
isRemoting = true;
gadgetName = REGISTER_CHANNEL;
remotingChannel = dnrChannel[5]; |
<<<<<<<
private volatile ApolloConfig _configCache;
private volatile ServiceDto _longPollServiceDto;
private volatile ApolloNotificationMessages _remoteMessages;
private Exception _syncException;
=======
private volatile ThreadSafe.AtomicReference<ApolloConfig> _configCache = new ThreadSafe.AtomicReference<ApolloConfig>(null);
private readonly ThreadSafe.AtomicReference<ServiceDto> _longPollServiceDto = new ThreadSafe.AtomicReference<ServiceDto>(null);
private readonly ThreadSafe.AtomicReference<ApolloNotificationMessages> _remoteMessages = new ThreadSafe.AtomicReference<ApolloNotificationMessages>(null);
private ExceptionDispatchInfo _syncException;
>>>>>>>
private volatile ApolloConfig _configCache;
private volatile ServiceDto _longPollServiceDto;
private volatile ApolloNotificationMessages _remoteMessages;
private ExceptionDispatchInfo _syncException; |
<<<<<<<
if (Meta != null && Meta.TryGetValue(Env.ToString(), out var meta)
&& !string.IsNullOrWhiteSpace(meta)) return meta;
return ConfigConsts.DefaultMetaServerUrl;
}
set => _metaServer = ConfigConsts.DefaultMetaServerUrl == value ? null : value;
}
=======
public IReadOnlyCollection<string> ConfigServer { get; set; }
>>>>>>>
if (Meta != null && Meta.TryGetValue(Env.ToString(), out var meta)
&& !string.IsNullOrWhiteSpace(meta)) return meta;
return ConfigConsts.DefaultMetaServerUrl;
}
set => _metaServer = ConfigConsts.DefaultMetaServerUrl == value ? null : value;
}
public IReadOnlyCollection<string> ConfigServer { get; set; } |
<<<<<<<
using Com.Ctrip.Framework.Apollo.Enums;
using System;
=======
using System;
using System.Collections.Generic;
>>>>>>>
using Com.Ctrip.Framework.Apollo.Enums;
using System;
using System.Collections.Generic; |
<<<<<<<
using Telerik.Sitefinity.Frontend.TestUtilities.CommonOperations;
=======
using Telerik.Sitefinity.Frontend.TestUtilities;
>>>>>>>
using Telerik.Sitefinity.Frontend.TestUtilities.CommonOperations;
using Telerik.Sitefinity.Frontend.TestUtilities;
<<<<<<<
FeatherServerOperations.ResourcePackages().AddNewLayoutFileToPackage(PackageName, LayoutFileName, FileResource);
=======
//// Path.Combine(sfpath, "ResourcePackages", packageName, "MVC", "Views", "Layouts", layoutFileName);
var assembly = FileInjectHelper.GetArrangementsAssembly();
Stream source = assembly.GetManifestResourceStream(FileResource);
var path = Path.Combine("ResourcePackages",PackageName, "MVC", "Views", "Layouts", LayoutFileName);
string filePath = FileInjectHelper.GetDestinationFilePath(path);
Stream destination = new FileStream(filePath, FileMode.Create, FileAccess.Write);
FileInjectHelper.CopyStream(source, destination);
>>>>>>>
FeatherServerOperations.ResourcePackages().AddNewLayoutFileToPackage(PackageName, LayoutFileName, FileResource);
<<<<<<<
string filePath = FeatherServerOperations.ResourcePackages().GetResourcePackageDestinationFilePath(PackageName, LayoutFileName);
File.Delete(filePath);
}
private const string FileResource = "Telerik.Sitefinity.Frontend.TestUtilities.Data.TestLayout.cshtml";
=======
var path = Path.Combine("ResourcePackages", PackageName, "MVC", "Views", "Layouts", LayoutFileName);
string filePath = FileInjectHelper.GetDestinationFilePath(path);
File.Delete(filePath);
}
private const string FileResource = "Telerik.Sitefinity.Frontend.TestUI.Arrangements.Data.TestLayout.cshtml";
>>>>>>>
string filePath = FeatherServerOperations.ResourcePackages().GetResourcePackageDestinationFilePath(PackageName, LayoutFileName);
File.Delete(filePath);
}
private const string FileResource = "Telerik.Sitefinity.Frontend.TestUI.Arrangements.Data.TestLayout.cshtml"; |
<<<<<<<
=======
private static PageTemplateFramework ExtractFramework()
{
var contextItems = SystemManager.CurrentHttpContext.Items;
PageTemplateFramework framework = (PageTemplateFramework)contextItems["PageTemplateFramework"];
return framework;
}
private void Unistall(SiteInitializer initializer)
{
var featherWidgetTypes = new List<string>();
var configManager = ConfigManager.GetManager();
var toolboxesConfig = configManager.GetSection<ToolboxesConfig>();
var pageManager = initializer.PageManager;
foreach (var toolbox in toolboxesConfig.Toolboxes.Values)
{
foreach (var section in toolbox.Sections)
{
var featherWidgets = ((ICollection<ToolboxItem>)section.Tools).Where(i => !i.ControllerType.IsNullOrEmpty() && i.ControllerType.StartsWith("Telerik.Sitefinity.Frontend", StringComparison.Ordinal));
featherWidgetTypes.AddRange(featherWidgets.Select(t => t.ControllerType));
var mvcToolsToDelete = featherWidgets.Select(i => i.GetKey());
foreach (var key in mvcToolsToDelete)
{
section.Tools.Remove(section.Tools.Elements.SingleOrDefault(e => e.GetKey() == key));
}
}
}
// Delete widgets from pages
this.DeleteControls(pageManager);
configManager.SaveSection(toolboxesConfig);
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
private void DeleteControls(PageManager pageManager)
{
List<ControlData> controlsToDelete = new List<ControlData>();
controlsToDelete.AddRange(this.GetControlsToDelete(pageManager));
List<PageData> pagesToInvalidate = new List<PageData>();
foreach (var control in controlsToDelete)
{
if (control is PageControl)
{
var pageForInvalidation = ((PageControl)control).Page;
if (pageForInvalidation != null)
pagesToInvalidate.Add(pageForInvalidation);
}
else if (control is TemplateControl)
{
pagesToInvalidate.AddRange(((TemplateControl)control).Page.Pages());
}
pageManager.Delete(control);
}
foreach (var page in pagesToInvalidate.Distinct())
page.BuildStamp++;
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
private List<ControlData> GetControlsToDelete(PageManager pageManager)
{
List<ControlData> controlsToDelete;
try
{
// Could fail if there are persisted records for not loaded types inherited from ControlData
controlsToDelete = this.GetFeatherControlsToDelete<ControlData>(pageManager);
}
catch
{
controlsToDelete = new List<ControlData>();
controlsToDelete.AddRange(this.GetFeatherControlsToDelete<PageControl>(pageManager));
controlsToDelete.AddRange(this.GetFeatherControlsToDelete<PageDraftControl>(pageManager));
controlsToDelete.AddRange(this.GetFeatherControlsToDelete<TemplateControl>(pageManager));
controlsToDelete.AddRange(this.GetFeatherControlsToDelete<TemplateDraftControl>(pageManager));
}
return controlsToDelete;
}
private List<ControlData> GetFeatherControlsToDelete<TControlData>(PageManager pageManager) where TControlData : ControlData
{
List<ControlData> controlsToDelete = new List<ControlData>();
controlsToDelete.AddRange(pageManager.GetControls<TControlData>().Where(c => c.Properties.Any(p => p.Name == "ControllerName" && p.Value.StartsWith("Telerik.Sitefinity.Frontend"))).ToList());
return controlsToDelete;
}
>>>>>>>
private void Unistall(SiteInitializer initializer)
{
var featherWidgetTypes = new List<string>();
var configManager = ConfigManager.GetManager();
var toolboxesConfig = configManager.GetSection<ToolboxesConfig>();
var pageManager = initializer.PageManager;
foreach (var toolbox in toolboxesConfig.Toolboxes.Values)
{
foreach (var section in toolbox.Sections)
{
var featherWidgets = ((ICollection<ToolboxItem>)section.Tools).Where(i => !i.ControllerType.IsNullOrEmpty() && i.ControllerType.StartsWith("Telerik.Sitefinity.Frontend", StringComparison.Ordinal));
featherWidgetTypes.AddRange(featherWidgets.Select(t => t.ControllerType));
var mvcToolsToDelete = featherWidgets.Select(i => i.GetKey());
foreach (var key in mvcToolsToDelete)
{
section.Tools.Remove(section.Tools.Elements.SingleOrDefault(e => e.GetKey() == key));
}
}
}
// Delete widgets from pages
this.DeleteControls(pageManager);
configManager.SaveSection(toolboxesConfig);
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
private void DeleteControls(PageManager pageManager)
{
List<ControlData> controlsToDelete = new List<ControlData>();
controlsToDelete.AddRange(this.GetControlsToDelete(pageManager));
List<PageData> pagesToInvalidate = new List<PageData>();
foreach (var control in controlsToDelete)
{
if (control is PageControl)
{
var pageForInvalidation = ((PageControl)control).Page;
if (pageForInvalidation != null)
pagesToInvalidate.Add(pageForInvalidation);
}
else if (control is TemplateControl)
{
pagesToInvalidate.AddRange(((TemplateControl)control).Page.Pages());
}
pageManager.Delete(control);
}
foreach (var page in pagesToInvalidate.Distinct())
page.BuildStamp++;
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
private List<ControlData> GetControlsToDelete(PageManager pageManager)
{
List<ControlData> controlsToDelete;
try
{
// Could fail if there are persisted records for not loaded types inherited from ControlData
controlsToDelete = this.GetFeatherControlsToDelete<ControlData>(pageManager);
}
catch
{
controlsToDelete = new List<ControlData>();
controlsToDelete.AddRange(this.GetFeatherControlsToDelete<PageControl>(pageManager));
controlsToDelete.AddRange(this.GetFeatherControlsToDelete<PageDraftControl>(pageManager));
controlsToDelete.AddRange(this.GetFeatherControlsToDelete<TemplateControl>(pageManager));
controlsToDelete.AddRange(this.GetFeatherControlsToDelete<TemplateDraftControl>(pageManager));
}
return controlsToDelete;
}
private List<ControlData> GetFeatherControlsToDelete<TControlData>(PageManager pageManager) where TControlData : ControlData
{
List<ControlData> controlsToDelete = new List<ControlData>();
controlsToDelete.AddRange(pageManager.GetControls<TControlData>().Where(c => c.Properties.Any(p => p.Name == "ControllerName" && p.Value.StartsWith("Telerik.Sitefinity.Frontend"))).ToList());
return controlsToDelete;
} |
<<<<<<<
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
namespace Telerik.Sitefinity.Frontend.TestUtilities.CommonOperations
{
/// <summary>
/// Provides common resource packages operations
/// </summary>
public class ResourcePackagesOperations
{
/// <summary>
/// Gets the file path of the layout file from the resource package.
/// </summary>
/// <param name="packageName">The name of the package.</param>
/// <param name="layoutFileName">The layout file name.</param>
/// <returns></returns>
public string GetResourcePackageDestinationFilePath(string packageName, string layoutFileName)
{
if (layoutFileName == null)
throw new ArgumentNullException("layoutFileName");
if (packageName == null)
throw new ArgumentNullException("packageName");
var sfpath = System.Web.Hosting.HostingEnvironment.MapPath("~/");
var filePath = Path.Combine(sfpath, "ResourcePackages", packageName, "MVC", "Views", "Layouts", layoutFileName);
return filePath;
}
/// <summary>
/// Adds new layout file to a selected resource package.
/// </summary>
/// <param name="packageName">The name of the package.</param>
/// <param name="layoutFileName">The name of the layout file.</param>
/// <param name="fileResource">The file resource.</param>
public void AddNewLayoutFileToPackage(string packageName, string layoutFileName, string fileResource)
{
var assembly = this.GetTestUtilitiesAssembly();
Stream source = assembly.GetManifestResourceStream(fileResource);
string filePath = this.GetResourcePackageDestinationFilePath(packageName, layoutFileName);
Stream destination = new FileStream(filePath, FileMode.Create, FileAccess.Write);
this.CopyStream(source, destination);
}
/// <summary>
/// Gets test UI arrangements assebly.
/// </summary>
/// <returns>The UI tests arrangements assembly.</returns>
internal Assembly GetTestUtilitiesAssembly()
{
var uiTestsArrangementsAssembly = AppDomain.CurrentDomain.GetAssemblies().Where(a => a.GetName().Name.Equals("Telerik.Sitefinity.Frontend.TestUtilities")).FirstOrDefault();
if (uiTestsArrangementsAssembly == null)
{
throw new DllNotFoundException("Assembly wasn't found");
}
return uiTestsArrangementsAssembly;
}
/// <summary>
/// Copies file stream to another file stream
/// </summary>
/// <param name="input">The input file.</param>
/// <param name="output">The destination file.</param>
private void CopyStream(Stream input, Stream output)
{
byte[] buffer = new byte[32768];
int read;
while ((read = input.Read(buffer, 0, buffer.Length)) > 0)
{
output.Write(buffer, 0, read);
}
}
}
}
=======
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
namespace Telerik.Sitefinity.Frontend.TestUtilities.CommonOperations
{
/// <summary>
/// Provides common resource packages operations
/// </summary>
public class ResourcePackagesOperations
{
/// <summary>
/// Gets the file path of the layout file from the resource package.
/// </summary>
/// <param name="packageName">The name of the package.</param>
/// <param name="layoutFileName">The layout file name.</param>
/// <returns>The file path if exists.</returns>
public string GetResourcePackageDestinationFilePath(string packageName, string layoutFileName)
{
var sfpath = System.Web.Hosting.HostingEnvironment.MapPath("~/");
var filePath = Path.Combine(sfpath, "ResourcePackages", packageName, "MVC", "Views", "Layouts", layoutFileName);
if (filePath == null)
{
throw new ArgumentNullException("FilePath was not found!");
}
return filePath;
}
/// <summary>
/// Gets the file path of the Resource Packages folder
/// </summary>
/// <returns>The file path if exists.</returns>
public string GetResourcePackagesDestination(string packageName)
{
var sfpath = System.Web.Hosting.HostingEnvironment.MapPath("~/");
var packagePath = Path.Combine(sfpath, "ResourcePackages", packageName);
if (packagePath == null)
{
throw new ArgumentNullException("FilePath was not found!");
}
return packagePath;
}
/// <summary>
/// Adds new layout file to a selected resource package.
/// </summary>
/// <param name="packageName">The name of the package.</param>
/// <param name="layoutFileName">The name of the layout file.</param>
/// <param name="fileResource">The file resource.</param>
public void AddNewResource(string fileResource, string filePath)
{
var assembly = this.GetTestUtilitiesAssembly();
Stream source = assembly.GetManifestResourceStream(fileResource);
Stream destination = new FileStream(filePath, FileMode.Create, FileAccess.Write);
this.CopyStream(source, destination);
destination.Dispose();
}
/// <summary>
/// Gets test UI arrangements assebly.
/// </summary>
/// <returns>The UI tests arrangements assembly.</returns>
public Assembly GetTestUtilitiesAssembly()
{
var uiTestsArrangementsAssembly = AppDomain.CurrentDomain.GetAssemblies().Where(a => a.GetName().Name.Equals("Telerik.Sitefinity.Frontend.TestUtilities")).FirstOrDefault();
if (uiTestsArrangementsAssembly == null)
{
throw new DllNotFoundException("Assembly wasn't found");
}
return uiTestsArrangementsAssembly;
}
/// <summary>
/// Copies file stream to another file stream
/// </summary>
/// <param name="input">The input file.</param>
/// <param name="output">The destination file.</param>
private void CopyStream(Stream input, Stream output)
{
byte[] buffer = new byte[32768];
int read;
while ((read = input.Read(buffer, 0, buffer.Length)) > 0)
{
output.Write(buffer, 0, read);
}
}
}
}
>>>>>>>
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
namespace Telerik.Sitefinity.Frontend.TestUtilities.CommonOperations
{
/// <summary>
/// Provides common resource packages operations
/// </summary>
public class ResourcePackagesOperations
{
/// <summary>
/// Gets the file path of the layout file from the resource package.
/// </summary>
/// <param name="packageName">The name of the package.</param>
/// <param name="layoutFileName">The layout file name.</param>
/// <returns>The file path if exists.</returns>
public string GetResourcePackageDestinationFilePath(string packageName, string layoutFileName)
{
if (layoutFileName == null)
throw new ArgumentNullException("layoutFileName");
if (packageName == null)
throw new ArgumentNullException("packageName");
var sfpath = System.Web.Hosting.HostingEnvironment.MapPath("~/");
var filePath = Path.Combine(sfpath, "ResourcePackages", packageName, "MVC", "Views", "Layouts", layoutFileName);
return filePath;
}
/// <summary>
/// Gets the file path of the Resource Packages folder
/// </summary>
/// <returns>The file path if exists.</returns>
public string GetResourcePackagesDestination(string packageName)
{
var sfpath = System.Web.Hosting.HostingEnvironment.MapPath("~/");
var packagePath = Path.Combine(sfpath, "ResourcePackages", packageName);
if (packagePath == null)
{
throw new ArgumentNullException("FilePath was not found!");
}
return packagePath;
}
/// <summary>
/// Adds new layout file to a selected resource package.
/// </summary>
/// <param name="packageName">The name of the package.</param>
/// <param name="layoutFileName">The name of the layout file.</param>
/// <param name="fileResource">The file resource.</param>
public void AddNewResource(string fileResource, string filePath)
{
var assembly = this.GetTestUtilitiesAssembly();
Stream source = assembly.GetManifestResourceStream(fileResource);
Stream destination = new FileStream(filePath, FileMode.Create, FileAccess.Write);
this.CopyStream(source, destination);
destination.Dispose();
}
/// <summary>
/// Gets test UI arrangements assebly.
/// </summary>
/// <returns>The UI tests arrangements assembly.</returns>
public Assembly GetTestUtilitiesAssembly()
{
var uiTestsArrangementsAssembly = AppDomain.CurrentDomain.GetAssemblies().Where(a => a.GetName().Name.Equals("Telerik.Sitefinity.Frontend.TestUtilities")).FirstOrDefault();
if (uiTestsArrangementsAssembly == null)
{
throw new DllNotFoundException("Assembly wasn't found");
}
return uiTestsArrangementsAssembly;
}
/// <summary>
/// Copies file stream to another file stream
/// </summary>
/// <param name="input">The input file.</param>
/// <param name="output">The destination file.</param>
private void CopyStream(Stream input, Stream output)
{
byte[] buffer = new byte[32768];
int read;
while ((read = input.Read(buffer, 0, buffer.Length)) > 0)
{
output.Write(buffer, 0, read);
}
}
}
} |
<<<<<<<
this.ninjectDependencyResolver = new StandardKernel();
FrontendModuleInstaller.Initialize(this.DependencyResolver);
=======
SystemManager.RegisterServiceStackPlugin(new ListsServiceStackPlugin());
SystemManager.RegisterServiceStackPlugin(new FilesServiceStackPlugin());
SystemManager.RegisterServiceStackPlugin(new ReviewsServiceStackPlugin());
this.controllerAssemblies = new ControllerContainerInitializer().RetrieveAssemblies();
this.ninjectDependencyResolver = this.CreateKernel();
this.ninjectDependencyResolver.Load(this.controllerAssemblies);
App.WorkWith()
.Module(settings.Name)
.Initialize()
.Configuration<FeatherConfig>();
>>>>>>>
this.ninjectDependencyResolver = this.CreateKernel();
FrontendModuleInstaller.Initialize(this.DependencyResolver);
App.WorkWith()
.Module(settings.Name)
.Initialize()
.Configuration<FeatherConfig>();
<<<<<<<
this.Uninitialize();
FrontendModuleUninstaller.Uninstall(this.initializers.Value);
base.Uninstall(initializer);
=======
base.Upgrade(initializer, upgradeFrom);
if (upgradeFrom < new Version(1, 2, 140, 0))
{
this.DeleteOldGridSection();
this.UpdateContentBlockTitle();
}
if (upgradeFrom <= new Version(1, 2, 180, 1))
{
this.RemoveMvcWidgetToolboxItems();
this.RenameDynamicContentMvcToolboxItems();
}
if (upgradeFrom <= new Version(1, 2, 260, 1))
{
this.RecategorizePageTemplates();
}
if (upgradeFrom <= new Version(1, 2, 270, 1))
{
this.UpdatePageTemplates();
}
if (upgradeFrom <= new Version(1, 2, 280, 2))
{
this.CreateDefaultTemplates();
}
if (upgradeFrom <= new Version(1, 3, 320, 0))
{
this.UpdateGridWidgetsToolbox();
this.UpdateGridWidgetPaths();
}
>>>>>>>
this.Uninitialize();
FrontendModuleUninstaller.Uninstall(this.initializers.Value);
base.Uninstall(initializer);
<<<<<<<
private Lazy<IEnumerable<IInitializer>> initializers = new Lazy<IEnumerable<IInitializer>>(() =>
typeof(FrontendModule).Assembly.GetTypes().Where(t => typeof(IInitializer).IsAssignableFrom(t) && !t.IsInterface && !t.IsAbstract).Select(t => Activator.CreateInstance(t) as IInitializer).ToList());
=======
private void UpdateGridWidgetsToolbox()
{
this.TransferGridWidgetSectionToDefault("BootstrapGrids");
this.TransferGridWidgetSectionToDefault("FoundationGrids");
this.TransferGridWidgetSectionToDefault("SemanticUIGrids");
}
private void TransferGridWidgetSectionToDefault(string sectionName)
{
var layoutConfig = Config.Get<ToolboxesConfig>().Toolboxes["PageLayouts"];
var section = layoutConfig.Sections.FirstOrDefault<ToolboxSection>(e => e.Name == sectionName);
if (section != null)
{
var registrator = new GridWidgetRegistrator();
foreach (var tool in section.Tools)
{
if (tool.LayoutTemplate.IsNullOrEmpty())
continue;
registrator.RegisterToolboxItem(System.Web.VirtualPathUtility.GetFileName(tool.LayoutTemplate));
}
var configurationManager = ConfigManager.GetManager();
using (new ElevatedConfigModeRegion())
{
var toolboxesConfig = configurationManager.GetSection<ToolboxesConfig>();
var pageControls = toolboxesConfig.Toolboxes["PageLayouts"];
var sectionToDelete = pageControls.Sections.FirstOrDefault<ToolboxSection>(e => e.Name == sectionName);
pageControls.Sections.Remove(sectionToDelete);
configurationManager.SaveSection(toolboxesConfig);
}
}
}
>>>>>>>
private Lazy<IEnumerable<IInitializer>> initializers = new Lazy<IEnumerable<IInitializer>>(() =>
typeof(FrontendModule).Assembly.GetTypes().Where(t => typeof(IInitializer).IsAssignableFrom(t) && !t.IsInterface && !t.IsAbstract).Select(t => Activator.CreateInstance(t) as IInitializer).ToList()); |
<<<<<<<
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
namespace Telerik.Sitefinity.Frontend.TestUtilities.CommonOperations
{
/// <summary>
/// Provides common resource packages operations
/// </summary>
public class ResourcePackagesOperations
{
/// <summary>
/// Gets the file path of the layout file from the resource package.
/// </summary>
/// <param name="packageName">The name of the package.</param>
/// <param name="layoutFileName">The layout file name.</param>
/// <returns>The file path if exists.</returns>
public string GetResourcePackageDestinationFilePath(string packageName, string layoutFileName)
{
if (layoutFileName == null)
throw new ArgumentNullException("layoutFileName");
if (packageName == null)
throw new ArgumentNullException("packageName");
var sfpath = System.Web.Hosting.HostingEnvironment.MapPath("~/");
var filePath = Path.Combine(sfpath, "ResourcePackages", packageName, "MVC", "Views", "Layouts", layoutFileName);
return filePath;
}
/// <summary>
/// Gets the file path of the Resource Packages folder
/// </summary>
/// <returns>The file path if exists.</returns>
public string GetResourcePackagesDestination(string packageName)
{
var sfpath = System.Web.Hosting.HostingEnvironment.MapPath("~/");
var packagePath = Path.Combine(sfpath, "ResourcePackages", packageName);
if (packagePath == null)
{
throw new ArgumentNullException("FilePath was not found!");
}
return packagePath;
}
/// <summary>
/// Adds new layout file to a selected resource package.
/// </summary>
/// <param name="packageName">The name of the package.</param>
/// <param name="layoutFileName">The name of the layout file.</param>
/// <param name="fileResource">The file resource.</param>
public void AddNewResource(string fileResource, string filePath)
{
var assembly = this.GetTestUtilitiesAssembly();
Stream source = assembly.GetManifestResourceStream(fileResource);
Stream destination = new FileStream(filePath, FileMode.Create, FileAccess.Write);
this.CopyStream(source, destination);
destination.Dispose();
}
/// <summary>
/// Gets test UI arrangements assebly.
/// </summary>
/// <returns>The UI tests arrangements assembly.</returns>
public Assembly GetTestUtilitiesAssembly()
{
var uiTestsArrangementsAssembly = AppDomain.CurrentDomain.GetAssemblies().Where(a => a.GetName().Name.Equals("Telerik.Sitefinity.Frontend.TestUtilities")).FirstOrDefault();
if (uiTestsArrangementsAssembly == null)
{
throw new DllNotFoundException("Assembly wasn't found");
}
return uiTestsArrangementsAssembly;
}
/// <summary>
/// Copies file stream to another file stream
/// </summary>
/// <param name="input">The input file.</param>
/// <param name="output">The destination file.</param>
private void CopyStream(Stream input, Stream output)
{
byte[] buffer = new byte[32768];
int read;
while ((read = input.Read(buffer, 0, buffer.Length)) > 0)
{
output.Write(buffer, 0, read);
}
}
}
}
=======
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using Telerik.Sitefinity.Modules.Pages;
using Telerik.Sitefinity.Utilities.Zip;
namespace Telerik.Sitefinity.Frontend.TestUtilities.CommonOperations
{
/// <summary>
/// Provides common resource packages operations
/// </summary>
public class ResourcePackagesOperations
{
/// <summary>
/// Gets the file path of the layout file from the resource package.
/// </summary>
/// <param name="packageName">The name of the package.</param>
/// <param name="layoutFileName">The layout file name.</param>
/// <returns>The file path if exists.</returns>
public string GetResourcePackageDestinationFilePath(string packageName, string layoutFileName)
{
var sfpath = System.Web.Hosting.HostingEnvironment.MapPath("~/");
var filePath = Path.Combine(sfpath, "ResourcePackages", packageName, "MVC", "Views", "Layouts", layoutFileName);
if (filePath == null)
{
throw new ArgumentNullException("FilePath was not found!");
}
return filePath;
}
/// <summary>
/// Gets the file path of the Resource Packages folder
/// </summary>
/// <returns>The file path if exists.</returns>
public string GetResourcePackagesDestination(string packageName)
{
var sfpath = System.Web.Hosting.HostingEnvironment.MapPath("~/");
var packagePath = Path.Combine(sfpath, "ResourcePackages", packageName);
if (packagePath == null)
{
throw new ArgumentNullException("FilePath was not found!");
}
return packagePath;
}
/// <summary>
/// Adds new layout file to a selected resource package.
/// </summary>
/// <param name="packageName">The name of the package.</param>
/// <param name="layoutFileName">The name of the layout file.</param>
/// <param name="fileResource">The file resource.</param>
public void AddNewResource(string fileResource, string filePath)
{
var assembly = this.GetTestUtilitiesAssembly();
Stream source = assembly.GetManifestResourceStream(fileResource);
Stream destination = new FileStream(filePath, FileMode.Create, FileAccess.Write);
this.CopyStream(source, destination);
destination.Dispose();
}
/// <summary>
/// Gets test UI arrangements assebly.
/// </summary>
/// <returns>The UI tests arrangements assembly.</returns>
public Assembly GetTestUtilitiesAssembly()
{
var uiTestsArrangementsAssembly = AppDomain.CurrentDomain.GetAssemblies().Where(a => a.GetName().Name.Equals("Telerik.Sitefinity.Frontend.TestUtilities")).FirstOrDefault();
if (uiTestsArrangementsAssembly == null)
{
throw new DllNotFoundException("Assembly wasn't found");
}
return uiTestsArrangementsAssembly;
}
/// <summary>
/// Renames the resource package folder.
/// </summary>
/// <param name="packageName">The name of the package.</param>
/// <param name="newPackageName">The new name of the package.</param>
public void RenamePackageFolder(string packageName, string newPackageName)
{
var sfpath = System.Web.Hosting.HostingEnvironment.MapPath("~/");
var packagePath = Path.Combine(sfpath, "ResourcePackages", packageName);
if (packagePath == null)
{
throw new ArgumentNullException("FilePath was not found!");
}
var directoryPath = Path.Combine(sfpath, "ResourcePackages", newPackageName);
Directory.Move(packagePath, directoryPath);
}
/// <summary>
/// Adds new resource package to file system.
/// </summary>
/// <param name="packageResource">The package resource path.</param>
public void AddNewResourcePackage(string packageResource)
{
var sfpath = System.Web.Hosting.HostingEnvironment.MapPath("~/");
var path = Path.Combine(sfpath, "ResourcePackages");
var assembly = FeatherServerOperations.ResourcePackages().GetTestUtilitiesAssembly();
Stream source = assembly.GetManifestResourceStream(packageResource);
byte[] data = new byte[source.Length];
source.Read(data, 0, (int)source.Length);
using (var stream = new MemoryStream(data))
{
using (ZipFile zipFile = ZipFile.Read(stream))
{
zipFile.ExtractAll(path, true);
}
}
}
/// <summary>
/// Copies file stream to another file stream
/// </summary>
/// <param name="input">The input file.</param>
/// <param name="output">The destination file.</param>
private void CopyStream(Stream input, Stream output)
{
byte[] buffer = new byte[32768];
int read;
while ((read = input.Read(buffer, 0, buffer.Length)) > 0)
{
output.Write(buffer, 0, read);
}
}
}
}
>>>>>>>
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using Telerik.Sitefinity.Modules.Pages;
using Telerik.Sitefinity.Utilities.Zip;
namespace Telerik.Sitefinity.Frontend.TestUtilities.CommonOperations
{
/// <summary>
/// Provides common resource packages operations
/// </summary>
public class ResourcePackagesOperations
{
/// <summary>
/// Gets the file path of the layout file from the resource package.
/// </summary>
/// <param name="packageName">The name of the package.</param>
/// <param name="layoutFileName">The layout file name.</param>
/// <returns>The file path if exists.</returns>
public string GetResourcePackageDestinationFilePath(string packageName, string layoutFileName)
{
if (layoutFileName == null)
throw new ArgumentNullException("layoutFileName");
if (packageName == null)
throw new ArgumentNullException("packageName");
var sfpath = System.Web.Hosting.HostingEnvironment.MapPath("~/");
var filePath = Path.Combine(sfpath, "ResourcePackages", packageName, "MVC", "Views", "Layouts", layoutFileName);
return filePath;
}
/// <summary>
/// Gets the file path of the Resource Packages folder
/// </summary>
/// <returns>The file path if exists.</returns>
public string GetResourcePackagesDestination(string packageName)
{
var sfpath = System.Web.Hosting.HostingEnvironment.MapPath("~/");
var packagePath = Path.Combine(sfpath, "ResourcePackages", packageName);
if (packagePath == null)
{
throw new ArgumentNullException("FilePath was not found!");
}
return packagePath;
}
/// <summary>
/// Adds new layout file to a selected resource package.
/// </summary>
/// <param name="packageName">The name of the package.</param>
/// <param name="layoutFileName">The name of the layout file.</param>
/// <param name="fileResource">The file resource.</param>
public void AddNewResource(string fileResource, string filePath)
{
var assembly = this.GetTestUtilitiesAssembly();
Stream source = assembly.GetManifestResourceStream(fileResource);
Stream destination = new FileStream(filePath, FileMode.Create, FileAccess.Write);
this.CopyStream(source, destination);
destination.Dispose();
}
/// <summary>
/// Gets test UI arrangements assebly.
/// </summary>
/// <returns>The UI tests arrangements assembly.</returns>
public Assembly GetTestUtilitiesAssembly()
{
var uiTestsArrangementsAssembly = AppDomain.CurrentDomain.GetAssemblies().Where(a => a.GetName().Name.Equals("Telerik.Sitefinity.Frontend.TestUtilities")).FirstOrDefault();
if (uiTestsArrangementsAssembly == null)
{
throw new DllNotFoundException("Assembly wasn't found");
}
return uiTestsArrangementsAssembly;
}
/// <summary>
/// Renames the resource package folder.
/// </summary>
/// <param name="packageName">The name of the package.</param>
/// <param name="newPackageName">The new name of the package.</param>
public void RenamePackageFolder(string packageName, string newPackageName)
{
var sfpath = System.Web.Hosting.HostingEnvironment.MapPath("~/");
var packagePath = Path.Combine(sfpath, "ResourcePackages", packageName);
if (packagePath == null)
{
throw new ArgumentNullException("FilePath was not found!");
}
var directoryPath = Path.Combine(sfpath, "ResourcePackages", newPackageName);
Directory.Move(packagePath, directoryPath);
}
/// <summary>
/// Adds new resource package to file system.
/// </summary>
/// <param name="packageResource">The package resource path.</param>
public void AddNewResourcePackage(string packageResource)
{
var sfpath = System.Web.Hosting.HostingEnvironment.MapPath("~/");
var path = Path.Combine(sfpath, "ResourcePackages");
var assembly = FeatherServerOperations.ResourcePackages().GetTestUtilitiesAssembly();
Stream source = assembly.GetManifestResourceStream(packageResource);
byte[] data = new byte[source.Length];
source.Read(data, 0, (int)source.Length);
using (var stream = new MemoryStream(data))
{
using (ZipFile zipFile = ZipFile.Read(stream))
{
zipFile.ExtractAll(path, true);
}
}
}
/// <summary>
/// Copies file stream to another file stream
/// </summary>
/// <param name="input">The input file.</param>
/// <param name="output">The destination file.</param>
private void CopyStream(Stream input, Stream output)
{
byte[] buffer = new byte[32768];
int read;
while ((read = input.Read(buffer, 0, buffer.Length)) > 0)
{
output.Write(buffer, 0, read);
}
}
}
} |
<<<<<<<
=======
private static string ConvertColor(string color)
{
if (!String.IsNullOrEmpty(color) && color.Substring(0, 1) == "#")
{
Color c = ColorTranslator.FromHtml(color);
return string.Format("rgb({0},{1},{2})", c.R, c.G, c.B);
}
else
return color;
}
private static IEnumerable<Field> TemplateFields(FieldCollection templateFields, TemplateModel model)
{
foreach (FieldElement fieldElement in templateFields)
{
String key = fieldElement.Key;
Field field = null;
switch (fieldElement.Type)
{
case FieldType.Standard:
StandardField standardField = new StandardField();
standardField.Value = model.GetField(key, FieldAttribute.Value, fieldElement.Value.Value);
field = standardField;
break;
case FieldType.Date:
DateField dateField = new DateField();
if (fieldElement.DateStyle != FieldDateTimeStyle.Unspecified)
dateField.DateStyle = fieldElement.DateStyle;
if (fieldElement.TimeStyle != FieldDateTimeStyle.Unspecified)
dateField.TimeStyle = fieldElement.TimeStyle;
if (fieldElement.IgnoresTimeZone.HasValue)
dateField.IgnoresTimeZone = fieldElement.IgnoresTimeZone.Value;
if (fieldElement.IsRelative.HasValue)
dateField.IsRelative = fieldElement.IsRelative.Value;
DateTime dateValue;
if (!DateTime.TryParse(fieldElement.Value.Value, out dateValue))
dateValue = DateTime.MinValue;
dateField.Value = model.GetField<DateTime>(key, FieldAttribute.Value, dateValue);
field = dateField;
break;
case FieldType.Number:
NumberField numberField = new NumberField();
if (fieldElement.NumberStyle != FieldNumberStyle.Unspecified)
numberField.NumberStyle = fieldElement.NumberStyle;
numberField.CurrencyCode = model.GetField(key, FieldAttribute.CurrencyCode, fieldElement.CurrencyCode.Value);
Decimal decimalValue;
if (!Decimal.TryParse(fieldElement.Value.Value, out decimalValue))
decimalValue = 0;
numberField.Value = model.GetField<Decimal>(key, FieldAttribute.Value, decimalValue);
field = numberField;
break;
}
field.Key = fieldElement.Key;
field.DataDetectorTypes = fieldElement.DataDetectorTypes;
if (field.TextAlignment != FieldTextAlignment.Unspecified)
{
field.TextAlignment = fieldElement.TextAlignment;
}
field.Label = model.GetField(key, FieldAttribute.Label, fieldElement.Label.Value);
field.AttributedValue = model.GetField(key, FieldAttribute.AttributedValue, fieldElement.AttributedValue.Value);
field.ChangeMessage = model.GetField(key, FieldAttribute.ChangeMessage, fieldElement.ChangeMessage.Value);
yield return field;
}
}
>>>>>>>
<<<<<<<
this.Barcodes = new List<Barcode>();
=======
this.Barcodes = new List<BarCode>();
>>>>>>>
this.Barcodes = new List<Barcode>();
<<<<<<<
=======
public void LoadTemplate(string template, TemplateModel parameters)
{
PassbookGeneratorSection section = System.Configuration.ConfigurationManager.GetSection("passbookGenerator") as PassbookGeneratorSection;
if (section == null)
{
throw new System.Configuration.ConfigurationErrorsException("\"passbookGenerator\" section could not be loaded.");
}
String path = TemplateModel.MapPath(section.AppleWWDRCACertificate);
if (File.Exists(path))
{
this.AppleWWDRCACertificate = File.ReadAllBytes(path);
}
TemplateElement templateConfig = section
.Templates
.OfType<TemplateElement>()
.FirstOrDefault(t => String.Equals(t.Name, template, StringComparison.OrdinalIgnoreCase));
if (templateConfig == null)
{
throw new System.Configuration.ConfigurationErrorsException(String.Format("Configuration for template \"{0}\" could not be loaded.", template));
}
this.Style = templateConfig.PassStyle;
if (this.Style == PassStyle.BoardingPass)
{
this.TransitType = templateConfig.TransitType;
}
// Certificates
this.CertificatePassword = templateConfig.CertificatePassword;
this.CertThumbprint = templateConfig.CertificateThumbprint;
path = TemplateModel.MapPath(templateConfig.Certificate);
if (File.Exists(path))
{
this.Certificate = File.ReadAllBytes(path);
}
if (String.IsNullOrEmpty(this.CertThumbprint) && this.Certificate == null)
{
throw new System.Configuration.ConfigurationErrorsException("Either Certificate or CertificateThumbprint is not configured correctly.");
}
// Standard Keys
this.Description = templateConfig.Description.Value;
this.OrganizationName = templateConfig.OrganizationName.Value;
this.PassTypeIdentifier = templateConfig.PassTypeIdentifier.Value;
this.TeamIdentifier = templateConfig.TeamIdentifier.Value;
// Associated App Keys
if (templateConfig.AppLaunchURL != null && !String.IsNullOrEmpty(templateConfig.AppLaunchURL.Value))
{
this.AppLaunchURL = templateConfig.AppLaunchURL.Value;
}
this.AssociatedStoreIdentifiers.AddRange(templateConfig.AssociatedStoreIdentifiers.OfType<ConfigurationProperty<int>>().Select(s => s.Value));
// Visual Appearance Keys
this.BackgroundColor = templateConfig.BackgroundColor.Value;
this.ForegroundColor = templateConfig.ForegroundColor.Value;
this.GroupingIdentifier = templateConfig.GroupingIdentifier.Value;
this.LabelColor = templateConfig.LabelColor.Value;
this.LogoText = templateConfig.LogoText.Value;
this.SuppressStripShine = templateConfig.SuppressStripShine.Value;
// Web Service Keys
this.AuthenticationToken = templateConfig.AuthenticationToken.Value;
this.WebServiceUrl = templateConfig.WebServiceURL.Value;
// Fields
this.AuxiliaryFields.AddRange(TemplateFields(templateConfig.AuxiliaryFields, parameters));
this.BackFields.AddRange(TemplateFields(templateConfig.BackFields, parameters));
this.HeaderFields.AddRange(TemplateFields(templateConfig.HeaderFields, parameters));
this.PrimaryFields.AddRange(TemplateFields(templateConfig.PrimaryFields, parameters));
this.SecondaryFields.AddRange(TemplateFields(templateConfig.SecondaryFields, parameters));
// Template Images
foreach (ImageElement image in templateConfig.Images)
{
String imagePath = TemplateModel.MapPath(image.FileName);
if (File.Exists(imagePath))
{
this.Images[image.Type] = File.ReadAllBytes(imagePath);
}
}
// Model Images (Overwriting template images)
foreach (KeyValuePair<PassbookImage, byte[]> image in parameters.GetImages())
{
this.Images[image.Key] = image.Value;
}
// Localization
foreach (LanguageElement localization in templateConfig.Localizations)
{
Dictionary<string, string> values;
if (!Localizations.TryGetValue(localization.Code, out values))
{
values = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Localizations.Add(localization.Code, values);
}
foreach (LocalizedEntry entry in localization.Localizations)
{
values[entry.Key] = entry.Value;
}
}
}
>>>>>>>
<<<<<<<
#region Companion App Keys
#endregion
#region Expiration Keys
=======
#region Expiration Keys
>>>>>>>
#region Companion App Keys
#endregion
#region Expiration Keys |
<<<<<<<
public TableJournal(string targetDbConnectionString) : this(() => new SqlConnection(targetDbConnectionString), "dbo", "SchemaVersions", new ConsoleLog())
=======
/// <param name="targetDbConnectionString">The connection to the target database.</param>
/// <example>
/// var journal = new TableJournal("Server=server;Database=database;Trusted_Connection=True");
/// </example>
public TableJournal(string targetDbConnectionString)
: this(targetDbConnectionString, "dbo", "SchemaVersions", new ConsoleLog())
{
}
/// <summary>
/// Initializes a new instance of the <see cref="TableJournal"/> class.
/// </summary>
/// <param name="targetDbConnectionString">The connection to the target database.</param>
/// <param name="schema">The schema that contains the table.</param>
/// <example>
/// var journal = new TableJournal("Server=server;Database=database;Trusted_Connection=True", "dbo");
/// </example>
public TableJournal(string targetDbConnectionString, string schema)
: this(targetDbConnectionString, schema, "SchemaVersions", new ConsoleLog())
>>>>>>>
public TableJournal(string targetDbConnectionString) : this(() => new SqlConnection(targetDbConnectionString), "dbo", "SchemaVersions", new ConsoleLog())
<<<<<<<
/// var journal = new TableJournal("Server=server;Database=database;Trusted_Connection=True;", "dbo", "MyVersionTable");
/// </example>
public TableJournal(Func<IDbConnection> connectionFactory, string schema, string table, ILog logger)
=======
/// var journal = new TableJournal("Server=server;Database=database;Trusted_Connection=True", "dbo", "MyVersionTable");
/// </example>
public TableJournal(string targetDbConnectionString, string schema, string table, ILog logger)
>>>>>>>
/// var journal = new TableJournal("Server=server;Database=database;Trusted_Connection=True", "dbo", "MyVersionTable");
/// </example>
public TableJournal(Func<IDbConnection> connectionFactory, string schema, string table, ILog logger)
<<<<<<<
using (var command = connection.CreateCommand())
{
command.CommandText = string.Format("select count(*) from {0}", tableName);
command.CommandType = CommandType.Text;
connection.Open();
command.ExecuteScalar();
return true;
}
=======
command.CommandText = string.Format("select count(*) from sys.objects where type='U' and name='{0}'", tableName);
command.CommandType = CommandType.Text;
connection.Open();
int result;
int.TryParse(command.ExecuteScalar().ToString(), out result);
return result != 0;
>>>>>>>
using (var command = connection.CreateCommand())
{
command.CommandText = string.Format("select count(*) from {0}", tableName);
command.CommandType = CommandType.Text;
connection.Open();
command.ExecuteScalar();
sddsdssreturn true;
int result;
} |
<<<<<<<
private readonly ILog log;
=======
private readonly string dbConnectionString;
private readonly ILog log;
private readonly string schema;
>>>>>>>
private readonly ILog log;
private readonly string schema;
<<<<<<<
this.connectionFactory = connectionFactory;
schemaTableName = tableName = table;
if (!string.IsNullOrEmpty(schema))
schemaTableName = schema + "." + tableName;
=======
dbConnectionString = targetDbConnectionString;
tableName = table;
this.schema = schema;
schemaTableName = schema + "." + tableName;
>>>>>>>
this.connectionFactory = connectionFactory;
schemaTableName = tableName = table;
this.schema = schema;
if (!string.IsNullOrEmpty(schema))
schemaTableName = schema + "." + tableName;
<<<<<<<
using (var command = connection.CreateCommand())
{
command.CommandText = string.Format("select count(*) from {0}", tableName);
command.CommandType = CommandType.Text;
connection.Open();
command.ExecuteScalar();
sddsdssreturn true;
=======
command.CommandText = string.Format(
@"select count(*)
from sys.objects
inner join sys.schemas on objects.schema_id = schemas.schema_id
where type='U' and objects.name = '{0}' and schemas.name = '{1}'", tableName, schema);
command.CommandType = CommandType.Text;
connection.Open();
>>>>>>>
using (var command = connection.CreateCommand())
{
command.CommandText = string.Format("select count(*) from {0}", tableName);
@"select count(*)
from sys.objects
inner join sys.schemas on objects.schema_id = schemas.schema_id
where type='U' and objects.name = '{0}' and schemas.name = '{1}'", tableName, schema);
command.CommandType = CommandType.Text;
connection.Open();
command.ExecuteScalar();
sddsdssreturn true;
<<<<<<<
catch (SqlException)
{
return false;
}
catch (DbException)
{
return false;
}
=======
>>>>>>>
catch (SqlException)
{
return false;
}
catch (DbException)
{
return false;
} |
<<<<<<<
new EmbeddedScriptProvider(typeof (Program).Assembly)
);
=======
new EmbeddedScriptProvider(typeof (Program).Assembly),
new TableJournal(database.ConnectionString),
new SqlScriptExecutor(database.ConnectionString));
>>>>>>>
new EmbeddedScriptProvider(typeof (Program).Assembly)
new EmbeddedScriptProvider(typeof (Program).Assembly),
new TableJournal(database.ConnectionString),
new SqlScriptExecutor(database.ConnectionString));
); |
<<<<<<<
private readonly ILog log;
=======
private readonly string dbConnectionString;
private readonly ILog log;
private readonly string schema;
>>>>>>>
private readonly ILog log;
private readonly string schema;
<<<<<<<
this.connectionFactory = connectionFactory;
schemaTableName = tableName = table;
if (!string.IsNullOrEmpty(schema))
schemaTableName = schema + "." + tableName;
=======
dbConnectionString = targetDbConnectionString;
tableName = table;
this.schema = schema;
schemaTableName = schema + "." + tableName;
>>>>>>>
this.connectionFactory = connectionFactory;
schemaTableName = tableName = table;
this.schema = schema;
if (!string.IsNullOrEmpty(schema))
schemaTableName = schema + "." + tableName;
<<<<<<<
using (var command = connection.CreateCommand())
{
command.CommandText = string.Format("select count(*) from {0}", tableName);
command.CommandType = CommandType.Text;
connection.Open();
command.ExecuteScalar();
sddsdssreturn true;
=======
command.CommandText = string.Format(
@"select count(*)
from sys.objects
inner join sys.schemas on objects.schema_id = schemas.schema_id
where type='U' and objects.name = '{0}' and schemas.name = '{1}'", tableName, schema);
command.CommandType = CommandType.Text;
connection.Open();
>>>>>>>
using (var command = connection.CreateCommand())
{
command.CommandText = string.Format("select count(*) from {0}", tableName);
@"select count(*)
from sys.objects
inner join sys.schemas on objects.schema_id = schemas.schema_id
where type='U' and objects.name = '{0}' and schemas.name = '{1}'", tableName, schema);
command.CommandType = CommandType.Text;
connection.Open();
command.ExecuteScalar();
sddsdssreturn true;
<<<<<<<
catch (SqlException)
{
return false;
}
catch (DbException)
{
return false;
}
=======
>>>>>>>
catch (SqlException)
{
return false;
}
catch (DbException)
{
return false;
} |
<<<<<<<
slider = new UISlider (new RectangleF (10f + captionSize.Width, UIDevice.CurrentDevice.CheckSystemVersion (7, 0) ? 18f : 12f, cell.ContentView.Bounds.Width - 20 - captionSize.Width, 7f)) {
=======
slider = new UISlider (new CGRect (10f + captionSize.Width, 12f, 280f - captionSize.Width, 7f)){
>>>>>>>
slider = new UISlider (new CGRect (10f + captionSize.Width, UIDevice.CurrentDevice.CheckSystemVersion (7, 0) ? 18f : 12f, cell.ContentView.Bounds.Width - 20 - captionSize.Width, 7f)) {
<<<<<<<
Date = DateValue,
MinuteInterval = MinuteInterval
=======
Date = (NSDate) DateValue
>>>>>>>
Date = (NSDate) DateValue,
MinuteInterval = MinuteInterval
<<<<<<<
=======
// X corresponds to the alignment, Y to the height of the password
public CGSize EntryAlignment;
>>>>>>>
// X corresponds to the alignment, Y to the height of the password
public CGSize EntryAlignment; |
<<<<<<<
if (refreshView != null){
var bounds = View.Bounds;
refreshView.Frame = new RectangleF (0, -bounds.Height, bounds.Width, bounds.Height);
}
//Console.WriteLine (View.Bounds);
=======
ReloadData ();
>>>>>>>
if (refreshView != null){
var bounds = View.Bounds;
refreshView.Frame = new RectangleF (0, -bounds.Height, bounds.Width, bounds.Height);
}
//Console.WriteLine (View.Bounds);
ReloadData (); |
<<<<<<<
var field = _automation.GetElement(elementSelector, conditions);
field.Focus();
field.Click(clickMode);
=======
CurrentActionBucket.Add(() =>
{
var field = _automation.GetElement(elementSelector, conditions);
field.Focus();
field.Click();
});
>>>>>>>
CurrentActionBucket.Add(() =>
{
var field = _automation.GetElement(elementSelector, conditions);
field.Click(clickMode);
}); |
<<<<<<<
/// <summary>
/// Clicks this instance.
/// </summary>
void Click();
/// <summary>
/// Focuses this instance.
/// </summary>
=======
void Click(ClickMode clickMode);
>>>>>>>
/// <summary>
/// Focuses this instance.
/// </summary>
void Click(ClickMode clickMode);
/// <summary>
/// Focuses this instance.
/// </summary> |
<<<<<<<
Provider.TakeAssertExceptionScreenshot();
throw new AssertException("Class name assertion failed. Expected element [{0}] to include a CSS class of [{1}] but current CSS class is [{2}].", fieldSelector, className, elementClassName.PrettifyErrorValue());
=======
if (!elementClassName.Equals(className))
{
Provider.TakeAssertExceptionScreenshot();
throw new AssertException("Class name assertion failed. Expected element [{0]] to include a CSS class of [{1}] but current CSS class is [{2}].", fieldSelector, className, elementClassName);
}
>>>>>>>
if (!elementClassName.Equals(className))
{
Provider.TakeAssertExceptionScreenshot();
throw new AssertException("Class name assertion failed. Expected element [{0}] to include a CSS class of [{1}] but current CSS class is [{2}].", fieldSelector, className, elementClassName.PrettifyErrorValue());
} |
<<<<<<<
_automation.TakeAssertExceptionScreenshot();
throw new AssertException("Count assertion failed. Expected there to be [{0}] elements matching [{1}]. Actual count is [{2}]", _count, fieldSelector, elements.Count());
}
=======
var elements = Provider.GetElements(fieldSelector, conditions);
if (elements.Count() != _count)
{
throw new AssertException("Count assertion failed. Expected there to be [{0}] elements matching [{1}]. Actual count is [{2}]", _count, fieldSelector, elements.Count());
}
});
>>>>>>>
var elements = Provider.GetElements(fieldSelector, conditions);
if (elements.Count() != _count)
{
_automation.TakeAssertExceptionScreenshot();
throw new AssertException("Count assertion failed. Expected there to be [{0}] elements matching [{1}]. Actual count is [{2}]", _count, fieldSelector, elements.Count());
}
}); |
<<<<<<<
process.StartInfo.FileName = Process.GetCurrentProcess().MainModule.FileName;
process.StartInfo.Arguments = Arguments;
process.StartInfo.UseShellExecute = true;
process.StartInfo.Verb = "runas";
try
{
process.Start();
if (!Close)
{
process.WaitForExit();
}
}
catch
{
MessageBox.Show("Mod Assistant needs to run this task as Admin. Please try again.");
}
if (Close) Application.Current.Shutdown();
=======
process.Start();
if (!Close)
process.WaitForExit();
}
catch
{
MessageBox.Show((string)Application.Current.FindResource("Utils:RunAsAdmin"));
>>>>>>>
process.StartInfo.FileName = Process.GetCurrentProcess().MainModule.FileName;
process.StartInfo.Arguments = Arguments;
process.StartInfo.UseShellExecute = true;
process.StartInfo.Verb = "runas";
try
{
process.Start();
if (!Close)
{
process.WaitForExit();
}
}
catch
{
MessageBox.Show((string)Application.Current.FindResource("Utils:RunAsAdmin"));
}
if (Close) Application.Current.Shutdown(); |
<<<<<<<
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using Common.Logging;
using Common.Logging.Simple;
using NUnit.Framework;
namespace Common
{
[TestFixture]
public class TestRunner
{
private static readonly ILog Log;
static TestRunner()
{
LogManager.Adapter = new ConsoleOutLoggerFactoryAdapter();
Log = LogManager.GetCurrentClassLogger();
}
private readonly string commonLoggingVersion = string.Format("{0}", Log.GetType().Assembly.GetName().Version);
private readonly string publicKeyToken = BitConverter.ToString(Log.GetType().Assembly.GetName().GetPublicKeyToken());
private readonly string TestExecutableFileName = "CommonLoggingBinaryCompatibilityTest.exe";
[Test]
public void CanUpgradeFromVersion12()
{
CompileAppAgainstVersion12();
AdjustAppConfigAssemblyRedirect();
Process process = new Process();
List<string> logLines = new List<string>();
using (process)
{
process.StartInfo.FileName = TestExecutableFileName;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.CreateNoWindow = true;
process.ErrorDataReceived += (sender, evt) =>
{
if (!string.IsNullOrEmpty(evt.Data))
{
Log.Error(evt.Data);
}
};
process.OutputDataReceived += (sender, evt) =>
{
if (!string.IsNullOrEmpty(evt.Data))
{
logLines.Add(evt.Data);
Log.Info(evt.Data);
}
};
process.Start();
process.BeginOutputReadLine();
process.BeginErrorReadLine();
process.WaitForExit();
Assert.AreEqual(0, process.ExitCode);
Assert.AreEqual(96, logLines.Count);
}
}
private void CompileAppAgainstVersion12()
{
var codeDomProvider = CodeDomProvider.CreateProvider("C#");
var parameters = new CompilerParameters();
parameters.GenerateExecutable = true;
parameters.OutputAssembly = TestExecutableFileName;
parameters.ReferencedAssemblies.Add("System.dll");
if (string.IsNullOrEmpty(publicKeyToken))
{
parameters.ReferencedAssemblies.Add("./1.2/Common.Logging-unsigned.dll");
}
else
{
parameters.ReferencedAssemblies.Add("./1.2/Common.Logging-signed.dll");
}
string code = GetManifestResourceText(this.GetType(), "CommonLoggingBinaryCompatibilityTest.csharp");
var results = codeDomProvider.CompileAssemblyFromSource(parameters, code);
if (results.Errors.Count > 0)
{
foreach (CompilerError CompErr in results.Errors)
{
Log.Error( "Line number " + CompErr.Line +
", Error Number: " + CompErr.ErrorNumber +
", '" + CompErr.ErrorText);
}
Assert.Fail();
}
}
private void AdjustAppConfigAssemblyRedirect()
{
string appConfigFileName = "CommonLoggingBinaryCompatibilityTest.exe.config";
string appConfigXml = GetManifestResourceText(this.GetType(), appConfigFileName);
appConfigXml = appConfigXml
.Replace(
"{version}",
commonLoggingVersion
)
.Replace(
"{publicKeyToken}",
publicKeyToken
)
;
File.WriteAllText(TestExecutableFileName + ".config", appConfigXml);
}
private string GetManifestResourceText(Type type, string name)
{
string code = null;
using (var stm = new StreamReader(this.GetType().Assembly.GetManifestResourceStream(type, name)))
{
code = stm.ReadToEnd();
}
return code;
}
}
}
=======
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using Common.Logging;
using Common.Logging.Simple;
using NUnit.Framework;
namespace Common
{
[TestFixture]
public class TestRunner
{
private static readonly ILog Log;
static TestRunner()
{
LogManager.Adapter = new ConsoleOutLoggerFactoryAdapter();
Log = LogManager.GetCurrentClassLogger();
}
private readonly string commonLoggingVersion = string.Format("{0}", Log.GetType().Assembly.GetName().Version);
private readonly string publicKeyToken = BitConverter.ToString(Log.GetType().Assembly.GetName().GetPublicKeyToken());
private readonly string TestExecutableFileName = "CommonLoggingBinaryCompatibilityTest.exe";
[Test]
public void CanUpgradeFromVersion12()
{
CompileAppAgainstVersion12("CommonLoggingBinaryCompatibilityTest.csharp");
AdjustAppConfigAssemblyRedirect("CommonLoggingBinaryCompatibilityTest.exe.config");
Run();
}
[Test]
public void CanUpgradeXmlConfigurationFromVersion12()
{
CompileAppAgainstVersion12("CommonLoggingBinaryCompatibilityTest2.csharp");
AdjustAppConfigAssemblyRedirect("CommonLoggingBinaryCompatibilityTest2.exe.config");
Run();
}
private void Run()
{
Process process = new Process();
List<string> logLines = new List<string>();
using (process)
{
process.StartInfo.FileName = TestExecutableFileName;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.CreateNoWindow = true;
process.ErrorDataReceived += (sender, evt) =>
{
if (!string.IsNullOrEmpty(evt.Data))
{
Log.Error(evt.Data);
}
};
process.OutputDataReceived += (sender, evt) =>
{
if (!string.IsNullOrEmpty(evt.Data))
{
logLines.Add(evt.Data);
Log.Info(evt.Data);
}
};
process.Start();
process.BeginOutputReadLine();
process.BeginErrorReadLine();
process.WaitForExit();
Assert.AreEqual(0, process.ExitCode);
// 6 levels, 3 entries per level
Assert.AreEqual(18, logLines.Count);
}
}
private void CompileAppAgainstVersion12(string codeFile)
{
var codeDomProvider = CodeDomProvider.CreateProvider("C#");
var parameters = new CompilerParameters();
parameters.GenerateExecutable = true;
parameters.OutputAssembly = TestExecutableFileName;
parameters.ReferencedAssemblies.Add("System.dll");
parameters.IncludeDebugInformation = true;
if (string.IsNullOrEmpty(publicKeyToken))
{
parameters.ReferencedAssemblies.Add("./1.2/Common.Logging-unsigned.dll");
}
else
{
parameters.ReferencedAssemblies.Add("./1.2/Common.Logging-signed.dll");
}
string code = GetManifestResourceText(this.GetType(), codeFile);
var results = codeDomProvider.CompileAssemblyFromSource(parameters, code);
if (results.Errors.Count > 0)
{
foreach (CompilerError CompErr in results.Errors)
{
Log.Error( "Line number " + CompErr.Line +
", Error Number: " + CompErr.ErrorNumber +
", '" + CompErr.ErrorText);
}
Assert.Fail();
}
}
private void AdjustAppConfigAssemblyRedirect(string appConfigFileName)
{
string appConfigXml = GetManifestResourceText(this.GetType(), appConfigFileName);
appConfigXml = appConfigXml
.Replace(
"{version}",
commonLoggingVersion
)
.Replace(
"{publicKeyToken}",
publicKeyToken
)
;
File.WriteAllText(TestExecutableFileName + ".config", appConfigXml);
}
private string GetManifestResourceText(Type type, string name)
{
string code = null;
using (var stm = new StreamReader(this.GetType().Assembly.GetManifestResourceStream(type, name)))
{
code = stm.ReadToEnd();
}
return code;
}
}
}
>>>>>>>
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using Common.Logging;
using Common.Logging.Simple;
using NUnit.Framework;
namespace Common
{
[TestFixture]
public class TestRunner
{
private static readonly ILog Log;
static TestRunner()
{
LogManager.Adapter = new ConsoleOutLoggerFactoryAdapter();
Log = LogManager.GetCurrentClassLogger();
}
private readonly string commonLoggingVersion = string.Format("{0}", Log.GetType().Assembly.GetName().Version);
private readonly string publicKeyToken = BitConverter.ToString(Log.GetType().Assembly.GetName().GetPublicKeyToken());
private readonly string TestExecutableFileName = "CommonLoggingBinaryCompatibilityTest.exe";
[Test]
public void CanUpgradeFromVersion12()
{
CompileAppAgainstVersion12("CommonLoggingBinaryCompatibilityTest.csharp");
AdjustAppConfigAssemblyRedirect("CommonLoggingBinaryCompatibilityTest.exe.config");
Run();
}
[Test]
public void CanUpgradeXmlConfigurationFromVersion12()
{
CompileAppAgainstVersion12("CommonLoggingBinaryCompatibilityTest2.csharp");
AdjustAppConfigAssemblyRedirect("CommonLoggingBinaryCompatibilityTest2.exe.config");
Run();
}
private void Run()
{
Process process = new Process();
List<string> logLines = new List<string>();
using (process)
{
process.StartInfo.FileName = TestExecutableFileName;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.CreateNoWindow = true;
process.ErrorDataReceived += (sender, evt) =>
{
if (!string.IsNullOrEmpty(evt.Data))
{
Log.Error(evt.Data);
}
};
process.OutputDataReceived += (sender, evt) =>
{
if (!string.IsNullOrEmpty(evt.Data))
{
logLines.Add(evt.Data);
Log.Info(evt.Data);
}
};
process.Start();
process.BeginOutputReadLine();
process.BeginErrorReadLine();
process.WaitForExit();
Assert.AreEqual(0, process.ExitCode);
Assert.AreEqual(96, logLines.Count);
}
}
private void CompileAppAgainstVersion12(string codeFile)
{
var codeDomProvider = CodeDomProvider.CreateProvider("C#");
var parameters = new CompilerParameters();
parameters.GenerateExecutable = true;
parameters.OutputAssembly = TestExecutableFileName;
parameters.ReferencedAssemblies.Add("System.dll");
parameters.IncludeDebugInformation = true;
if (string.IsNullOrEmpty(publicKeyToken))
{
parameters.ReferencedAssemblies.Add("./1.2/Common.Logging-unsigned.dll");
}
else
{
parameters.ReferencedAssemblies.Add("./1.2/Common.Logging-signed.dll");
}
string code = GetManifestResourceText(this.GetType(), codeFile);
var results = codeDomProvider.CompileAssemblyFromSource(parameters, code);
if (results.Errors.Count > 0)
{
foreach (CompilerError CompErr in results.Errors)
{
Log.Error( "Line number " + CompErr.Line +
", Error Number: " + CompErr.ErrorNumber +
", '" + CompErr.ErrorText);
}
Assert.Fail();
}
}
private void AdjustAppConfigAssemblyRedirect(string appConfigFileName)
{
string appConfigXml = GetManifestResourceText(this.GetType(), appConfigFileName);
appConfigXml = appConfigXml
.Replace(
"{version}",
commonLoggingVersion
)
.Replace(
"{publicKeyToken}",
publicKeyToken
)
;
File.WriteAllText(TestExecutableFileName + ".config", appConfigXml);
}
private string GetManifestResourceText(Type type, string name)
{
string code = null;
using (var stm = new StreamReader(this.GetType().Assembly.GetManifestResourceStream(type, name)))
{
code = stm.ReadToEnd();
}
return code;
}
}
} |
<<<<<<<
using System.Runtime.InteropServices;
=======
>>>>>>>
<<<<<<<
=======
using System.Runtime.InteropServices;
>>>>>>>
using System.Runtime.InteropServices; |
<<<<<<<
/// Flush callback
/// </summary>
protected readonly Action<long> FlushCallback = null;
/// <summary>
=======
/// Flush callback
/// </summary>
protected readonly Action<CommitInfo> FlushCallback = null;
/// <summary>
/// Error handling
/// </summary>
private readonly ErrorList errorList = new ErrorList();
/// <summary>
>>>>>>>
/// Flush callback
/// </summary>
protected readonly Action<CommitInfo> FlushCallback = null;
/// <summary>
/// Error handling
/// </summary>
private readonly ErrorList errorList = new ErrorList();
/// <summary>
<<<<<<<
/// <param name="flushCallback"></param>
public AllocatorBase(LogSettings settings, IFasterEqualityComparer<Key> comparer, Action<long, long> evictCallback, LightEpoch epoch, Action<long> flushCallback)
=======
/// <param name="flushCallback"></param>
public AllocatorBase(LogSettings settings, IFasterEqualityComparer<Key> comparer, Action<long, long> evictCallback, LightEpoch epoch, Action<CommitInfo> flushCallback)
>>>>>>>
/// <param name="flushCallback"></param>
public AllocatorBase(LogSettings settings, IFasterEqualityComparer<Key> comparer, Action<long, long> evictCallback, LightEpoch epoch, Action<CommitInfo> flushCallback)
<<<<<<<
localTailPageOffset.Page++;
localTailPageOffset.Offset = 0;
TailPageOffset = localTailPageOffset;
return 0;
=======
localTailPageOffset.Page++;
localTailPageOffset.Offset = 0;
TailPageOffset = localTailPageOffset;
return 0;
>>>>>>>
localTailPageOffset.Page++;
localTailPageOffset.Offset = 0;
TailPageOffset = localTailPageOffset;
return 0;
<<<<<<<
/// <param name="notifyDone"></param>
public void ShiftReadOnlyToTail(out long tailAddress, out SemaphoreSlim notifyDone)
=======
public bool ShiftReadOnlyToTail(out long tailAddress)
>>>>>>>
/// <param name="notifyDone"></param>
public bool ShiftReadOnlyToTail(out long tailAddress, out SemaphoreSlim notifyDone)
<<<<<<<
notifyFlushedUntilAddressSemaphore = new SemaphoreSlim(0);
notifyDone = notifyFlushedUntilAddressSemaphore;
notifyFlushedUntilAddress = localTailAddress;
epoch.BumpCurrentEpoch(() => OnPagesMarkedReadOnly(localTailAddress));
=======
epoch.BumpCurrentEpoch(() => OnPagesMarkedReadOnly(localTailAddress));
return true;
>>>>>>>
notifyFlushedUntilAddressSemaphore = new SemaphoreSlim(0);
notifyDone = notifyFlushedUntilAddressSemaphore;
notifyFlushedUntilAddress = localTailAddress;
epoch.BumpCurrentEpoch(() => OnPagesMarkedReadOnly(localTailAddress));
return true;
<<<<<<<
int closePage = (int)(closePageAddress >> LogPageSizeBits);
int closePageIndex = closePage % BufferSize;
if (!IsAllocated(closePageIndex))
AllocatePage(closePageIndex);
else
ClearPage(closePage);
Utility.MonotonicUpdate(ref PageStatusIndicator[closePageIndex].LastClosedUntilAddress, closePageAddress + PageSize, out _);
ShiftClosedUntilAddress();
if (ClosedUntilAddress > FlushedUntilAddress)
{
throw new Exception($"Closed address {ClosedUntilAddress} exceeds flushed address {FlushedUntilAddress}");
}
=======
int closePage = (int)(closePageAddress >> LogPageSizeBits);
int closePageIndex = closePage % BufferSize;
if (!IsAllocated(closePageIndex))
AllocatePage(closePageIndex);
else
ClearPage(closePage);
Utility.MonotonicUpdate(ref PageStatusIndicator[closePageIndex].LastClosedUntilAddress, closePageAddress + PageSize, out _);
ShiftClosedUntilAddress();
if (ClosedUntilAddress > FlushedUntilAddress)
{
throw new Exception($"Closed address {ClosedUntilAddress} exceeds flushed address {FlushedUntilAddress}");
}
>>>>>>>
int closePage = (int)(closePageAddress >> LogPageSizeBits);
int closePageIndex = closePage % BufferSize;
if (!IsAllocated(closePageIndex))
AllocatePage(closePageIndex);
else
ClearPage(closePage);
Utility.MonotonicUpdate(ref PageStatusIndicator[closePageIndex].LastClosedUntilAddress, closePageAddress + PageSize, out _);
ShiftClosedUntilAddress();
if (ClosedUntilAddress > FlushedUntilAddress)
{
throw new Exception($"Closed address {ClosedUntilAddress} exceeds flushed address {FlushedUntilAddress}");
}
<<<<<<<
pageLastFlushedAddress = PageStatusIndicator[page % BufferSize].LastFlushedUntilAddress;
}
if (update)
{
if (Utility.MonotonicUpdate(ref FlushedUntilAddress, currentFlushedUntilAddress, out long oldFlushedUntilAddress))
{
FlushCallback?.Invoke(FlushedUntilAddress);
if ((oldFlushedUntilAddress < notifyFlushedUntilAddress) && (currentFlushedUntilAddress >= notifyFlushedUntilAddress))
{
notifyFlushedUntilAddressSemaphore.Release();
}
}
}
}
/// <summary>
/// Shift ClosedUntil address
/// </summary>
protected void ShiftClosedUntilAddress()
{
long currentClosedUntilAddress = ClosedUntilAddress;
long page = GetPage(currentClosedUntilAddress);
bool update = false;
long pageLastClosedAddress = PageStatusIndicator[page % BufferSize].LastClosedUntilAddress;
while (pageLastClosedAddress >= currentClosedUntilAddress && currentClosedUntilAddress >= (page << LogPageSizeBits))
{
currentClosedUntilAddress = pageLastClosedAddress;
update = true;
page++;
pageLastClosedAddress = PageStatusIndicator[(int)(page % BufferSize)].LastClosedUntilAddress;
=======
pageLastFlushedAddress = PageStatusIndicator[page % BufferSize].LastFlushedUntilAddress;
}
if (update)
{
if (Utility.MonotonicUpdate(ref FlushedUntilAddress, currentFlushedUntilAddress, out long oldFlushedUntilAddress))
{
uint errorCode = 0;
if (errorList.Count > 0)
{
errorCode = errorList.CheckAndWait(oldFlushedUntilAddress, currentFlushedUntilAddress);
}
FlushCallback?.Invoke(
new CommitInfo
{
BeginAddress = BeginAddress,
FromAddress = oldFlushedUntilAddress,
UntilAddress = currentFlushedUntilAddress,
ErrorCode = errorCode
});
if (errorList.Count > 0)
{
errorList.RemoveUntil(currentFlushedUntilAddress);
}
}
}
}
/// <summary>
/// Shift ClosedUntil address
/// </summary>
protected void ShiftClosedUntilAddress()
{
long currentClosedUntilAddress = ClosedUntilAddress;
long page = GetPage(currentClosedUntilAddress);
bool update = false;
long pageLastClosedAddress = PageStatusIndicator[page % BufferSize].LastClosedUntilAddress;
while (pageLastClosedAddress >= currentClosedUntilAddress && currentClosedUntilAddress >= (page << LogPageSizeBits))
{
currentClosedUntilAddress = pageLastClosedAddress;
update = true;
page++;
pageLastClosedAddress = PageStatusIndicator[(int)(page % BufferSize)].LastClosedUntilAddress;
>>>>>>>
pageLastFlushedAddress = PageStatusIndicator[page % BufferSize].LastFlushedUntilAddress;
}
if (update)
{
if (Utility.MonotonicUpdate(ref FlushedUntilAddress, currentFlushedUntilAddress, out long oldFlushedUntilAddress))
{
uint errorCode = 0;
if (errorList.Count > 0)
{
errorCode = errorList.CheckAndWait(oldFlushedUntilAddress, currentFlushedUntilAddress);
}
FlushCallback?.Invoke(
new CommitInfo
{
BeginAddress = BeginAddress,
FromAddress = oldFlushedUntilAddress,
UntilAddress = currentFlushedUntilAddress,
ErrorCode = errorCode
});
if (errorList.Count > 0)
{
errorList.RemoveUntil(currentFlushedUntilAddress);
}
if ((oldFlushedUntilAddress < notifyFlushedUntilAddress) && (currentFlushedUntilAddress >= notifyFlushedUntilAddress))
{
notifyFlushedUntilAddressSemaphore.Release();
}
}
}
}
/// <summary>
/// Shift ClosedUntil address
/// </summary>
protected void ShiftClosedUntilAddress()
{
long currentClosedUntilAddress = ClosedUntilAddress;
long page = GetPage(currentClosedUntilAddress);
bool update = false;
long pageLastClosedAddress = PageStatusIndicator[page % BufferSize].LastClosedUntilAddress;
while (pageLastClosedAddress >= currentClosedUntilAddress && currentClosedUntilAddress >= (page << LogPageSizeBits))
{
currentClosedUntilAddress = pageLastClosedAddress;
update = true;
page++;
pageLastClosedAddress = PageStatusIndicator[(int)(page % BufferSize)].LastClosedUntilAddress;
<<<<<<<
long offsetInStartPage = GetOffsetInPage(fromAddress);
long offsetInEndPage = GetOffsetInPage(untilAddress);
// Extra (partial) page being flushed
=======
long offsetInStartPage = GetOffsetInPage(fromAddress);
long offsetInEndPage = GetOffsetInPage(untilAddress);
// Extra (partial) page being flushed
>>>>>>>
long offsetInStartPage = GetOffsetInPage(fromAddress);
long offsetInEndPage = GetOffsetInPage(untilAddress);
// Extra (partial) page being flushed
<<<<<<<
// Partial page starting point, need to wait until the
// ongoing adjacent flush is completed to ensure correctness
if (offsetInStartPage > 0)
{
while (FlushedUntilAddress < fromAddress)
{
epoch.ProtectAndDrain();
Thread.Yield();
}
}
=======
>>>>>>>
<<<<<<<
}
WriteAsync(flushPage, AsyncFlushPageCallback, asyncResult);
=======
}
// Partial page starting point, need to wait until the
// ongoing adjacent flush is completed to ensure correctness
if (GetOffsetInPage(asyncResult.fromAddress) > 0)
{
// Enqueue work in shared queue
var index = GetPageIndexForAddress(asyncResult.fromAddress);
PendingFlush[index].Add(asyncResult);
if (PendingFlush[index].RemoveAdjacent(FlushedUntilAddress, out PageAsyncFlushResult<Empty> request))
{
WriteAsync(request.fromAddress >> LogPageSizeBits, AsyncFlushPageCallback, request);
}
}
else
WriteAsync(flushPage, AsyncFlushPageCallback, asyncResult);
>>>>>>>
}
// Partial page starting point, need to wait until the
// ongoing adjacent flush is completed to ensure correctness
if (GetOffsetInPage(asyncResult.fromAddress) > 0)
{
// Enqueue work in shared queue
var index = GetPageIndexForAddress(asyncResult.fromAddress);
PendingFlush[index].Add(asyncResult);
if (PendingFlush[index].RemoveAdjacent(FlushedUntilAddress, out PageAsyncFlushResult<Empty> request))
{
WriteAsync(request.fromAddress >> LogPageSizeBits, AsyncFlushPageCallback, request);
}
}
else
WriteAsync(flushPage, AsyncFlushPageCallback, asyncResult);
<<<<<<<
Utility.MonotonicUpdate(ref PageStatusIndicator[result.page % BufferSize].LastFlushedUntilAddress, result.untilAddress, out long old);
=======
if (errorCode != 0)
{
errorList.Add(result.fromAddress);
}
Utility.MonotonicUpdate(ref PageStatusIndicator[result.page % BufferSize].LastFlushedUntilAddress, result.untilAddress, out _);
>>>>>>>
if (errorCode != 0)
{
errorList.Add(result.fromAddress);
}
Utility.MonotonicUpdate(ref PageStatusIndicator[result.page % BufferSize].LastFlushedUntilAddress, result.untilAddress, out _); |
<<<<<<<
using NeoServer.Data.Model;
using NeoServer.Server.Model.Players;
=======
using NeoServer.Loaders.Vocations;
>>>>>>>
using NeoServer.Loaders.Vocations;
using NeoServer.Data.Model;
using NeoServer.Server.Model.Players;
<<<<<<<
context.SaveChanges();
var accounts = context.Accounts.AsQueryable().ToList();
context.Player.Add(player);
context.SaveChanges();
var players = context.Player.AsQueryable().ToList();
var logger = container.Resolve<Logger>();
=======
>>>>>>>
context.SaveChanges();
var accounts = context.Accounts.AsQueryable().ToList();
context.Player.Add(player);
context.SaveChanges();
var players = context.Player.AsQueryable().ToList();
var logger = container.Resolve<Logger>(); |
<<<<<<<
false, String.Format(
"Method '{0}' with parameters '{1}' not found", methodName, PrettyPrint(getParameterTypesMethod, genericArgumentsCount)));
=======
false, String.Format(CultureInfo.CurrentCulture,
"Method '{0}' with parameters '{1}' not found", methodName, PrettyPrint(getParameterTypesDelegate.Method, genericArgumentsCount)));
>>>>>>>
false, String.Format(
"Method '{0}' with parameters '{1}' not found", methodName, PrettyPrint(getParameterTypesDelegate.Method, genericArgumentsCount))); |
<<<<<<<
private static bool TryHandleGetHashCode(IInterceptedFakeObjectCall fakeObjectCall)
=======
private bool TryHandleGetHashCode(IWritableFakeObjectCall fakeObjectCall)
>>>>>>>
private bool TryHandleGetHashCode(IInterceptedFakeObjectCall fakeObjectCall) |
<<<<<<<
using System.Linq;
using Flepper.QueryBuilder.Base;
=======
>>>>>>>
using System.Linq; |
<<<<<<<
private async Task SetPageSizeAsync(ChangeEventArgs args)
=======
[Inject]
IStringLocalizer<Localization.Localization> Localization { get; set; }
private void SetPageSize(ChangeEventArgs args)
>>>>>>>
[Inject]
IStringLocalizer<Localization.Localization> Localization { get; set; }
private async Task SetPageSizeAsync(ChangeEventArgs args) |
<<<<<<<
private bool _originalStartWithWindows;
=======
private bool _originalHookAltTab;
>>>>>>>
<<<<<<<
public bool StartWithWindows { get; set; }
=======
public bool HookAltTab { get; set; }
>>>>>>>
<<<<<<<
// Settings
StartWithWindows = _originalStartWithWindows = GetStartWithWindows();
=======
HookAltTab = _originalHookAltTab = Properties.Settings.Default.HookAltTab;
ShortcutPressesBeforeOpen = Properties.Settings.Default.ShortcutPressesBeforeOpen;
>>>>>>>
// Settings |
<<<<<<<
.HttpRoute(route => route
.HttpFunction<HttpCommandWithNoRoute>()
)
.Storage("storageConnectionString", storage => storage
=======
.HttpRoute("outputBindings", route => route
// Service Bus
.HttpFunction<HttpTriggerServiceBusQueueOutputCommand>("/toServiceBusQueue")
.OutputTo.ServiceBusQueue(Constants.ServiceBus.MarkerQueue)
.HttpFunction<HttpTriggerServiceBusQueueCollectionOutputCommand>("/collectionToServiceBusQueue")
.OutputTo.ServiceBusQueue(Constants.ServiceBus.MarkerQueue)
.HttpFunction<HttpTriggerServiceBusTopicOutputCommand>("/toServiceBusTopic")
.OutputTo.ServiceBusQueue(Constants.ServiceBus.MarkerTopic)
.HttpFunction<HttpTriggerServiceBusTopicCollectionOutputCommand>("/collectionToServiceBusTopic")
.OutputTo.ServiceBusQueue(Constants.ServiceBus.MarkerTopic)
// Storage
//.HttpFunction<HttpTriggerStorageBlobOutputCommandResultCommand>("/toBlobOutputWithName")
//.OutputTo.StorageBlob("storageConnectionString", "")
.HttpFunction<HttpTriggerStorageQueueOutputCommand>("/toStorageQueue")
.OutputTo.StorageQueue(Constants.Storage.Queue.MarkerQueue)
.HttpFunction<HttpTriggerStorageQueueCollectionOutputCommand>("/collectionToStorageQueue")
.OutputTo.StorageQueue(Constants.Storage.Queue.MarkerQueue)
.HttpFunction<HttpTriggerStorageTableOutputCommand>("/toStorageTable")
.OutputTo.StorageTable(Constants.Storage.Table.Markers)
.HttpFunction<HttpTriggerStorageTableCollectionOutputCommand>("/collectionToStorageTable")
.OutputTo.StorageTable(Constants.Storage.Table.Markers)
// Cosmos
.HttpFunction<HttpTriggerCosmosOutputCommand>("/toCosmos")
.OutputTo.CosmosDb(Constants.Cosmos.Collection, Constants.Cosmos.Database)
.HttpFunction<HttpTriggerCosmosCollectionOutputCommand>("/collectionToCosmos")
.OutputTo.CosmosDb(Constants.Cosmos.Collection, Constants.Cosmos.Database)
)
// SignalR tests
.HttpRoute("signalR", route => route
.HttpFunction<SendMessageCommand>("/messageToAll")
.OutputTo.SignalRMessage(Constants.SignalR.HubName)
.HttpFunction<SendMessageToGroupCommand>("/messageToGroup/{groupName}")
.OutputTo.SignalRMessage(Constants.SignalR.HubName)
.HttpFunction<SendMessageCollectionCommand>("/messageCollectionToUser", HttpMethod.Post)
.OutputTo.SignalRMessage(Constants.SignalR.HubName)
.HttpFunction<AddUserToGroupCommand>("/addUserToGroup", HttpMethod.Put)
.OutputTo.SignalRGroupAction(Constants.SignalR.HubName)
.HttpFunction<RemoveUserFromGroupCommand>("/removeUserFromGroup", HttpMethod.Put)
.OutputTo.SignalRGroupAction(Constants.SignalR.HubName)
)
.ServiceBus(serviceBus => serviceBus
.QueueFunction<SendMessageToUserCommand>(Constants.ServiceBus.SignalRQueue)
.OutputTo.SignalRMessage(Constants.SignalR.HubName)
)
.SignalR(signalR => signalR
.Negotiate<NegotiateCommand>("/negotiate")
.Negotiate("/simpleNegotiate", Constants.SignalR.HubName, "{headers.x-ms-client-principal-id}")
)
// Storage
.Storage(storage => storage
>>>>>>>
.HttpRoute(route => route
.HttpFunction<HttpCommandWithNoRoute>()
)
.HttpRoute("outputBindings", route => route
// Service Bus
.HttpFunction<HttpTriggerServiceBusQueueOutputCommand>("/toServiceBusQueue")
.OutputTo.ServiceBusQueue(Constants.ServiceBus.MarkerQueue)
.HttpFunction<HttpTriggerServiceBusQueueCollectionOutputCommand>("/collectionToServiceBusQueue")
.OutputTo.ServiceBusQueue(Constants.ServiceBus.MarkerQueue)
.HttpFunction<HttpTriggerServiceBusTopicOutputCommand>("/toServiceBusTopic")
.OutputTo.ServiceBusQueue(Constants.ServiceBus.MarkerTopic)
.HttpFunction<HttpTriggerServiceBusTopicCollectionOutputCommand>("/collectionToServiceBusTopic")
.OutputTo.ServiceBusQueue(Constants.ServiceBus.MarkerTopic)
// Storage
//.HttpFunction<HttpTriggerStorageBlobOutputCommandResultCommand>("/toBlobOutputWithName")
//.OutputTo.StorageBlob("storageConnectionString", "")
.HttpFunction<HttpTriggerStorageQueueOutputCommand>("/toStorageQueue")
.OutputTo.StorageQueue(Constants.Storage.Queue.MarkerQueue)
.HttpFunction<HttpTriggerStorageQueueCollectionOutputCommand>("/collectionToStorageQueue")
.OutputTo.StorageQueue(Constants.Storage.Queue.MarkerQueue)
.HttpFunction<HttpTriggerStorageTableOutputCommand>("/toStorageTable")
.OutputTo.StorageTable(Constants.Storage.Table.Markers)
.HttpFunction<HttpTriggerStorageTableCollectionOutputCommand>("/collectionToStorageTable")
.OutputTo.StorageTable(Constants.Storage.Table.Markers)
// Cosmos
.HttpFunction<HttpTriggerCosmosOutputCommand>("/toCosmos")
.OutputTo.CosmosDb(Constants.Cosmos.Collection, Constants.Cosmos.Database)
.HttpFunction<HttpTriggerCosmosCollectionOutputCommand>("/collectionToCosmos")
.OutputTo.CosmosDb(Constants.Cosmos.Collection, Constants.Cosmos.Database)
)
// SignalR tests
.HttpRoute("signalR", route => route
.HttpFunction<SendMessageCommand>("/messageToAll")
.OutputTo.SignalRMessage(Constants.SignalR.HubName)
.HttpFunction<SendMessageToGroupCommand>("/messageToGroup/{groupName}")
.OutputTo.SignalRMessage(Constants.SignalR.HubName)
.HttpFunction<SendMessageCollectionCommand>("/messageCollectionToUser", HttpMethod.Post)
.OutputTo.SignalRMessage(Constants.SignalR.HubName)
.HttpFunction<AddUserToGroupCommand>("/addUserToGroup", HttpMethod.Put)
.OutputTo.SignalRGroupAction(Constants.SignalR.HubName)
.HttpFunction<RemoveUserFromGroupCommand>("/removeUserFromGroup", HttpMethod.Put)
.OutputTo.SignalRGroupAction(Constants.SignalR.HubName)
)
.ServiceBus(serviceBus => serviceBus
.QueueFunction<SendMessageToUserCommand>(Constants.ServiceBus.SignalRQueue)
.OutputTo.SignalRMessage(Constants.SignalR.HubName)
)
.SignalR(signalR => signalR
.Negotiate<NegotiateCommand>("/negotiate")
.Negotiate("/simpleNegotiate", Constants.SignalR.HubName, "{headers.x-ms-client-principal-id}")
)
// Storage
.Storage(storage => storage |
<<<<<<<
public bool IsEnum => Type.IsEnum;
}
=======
public bool IsNullable => Type.IsGenericType && Type.GetGenericTypeDefinition() == typeof(Nullable<>);
public string NullableType => Type.GetGenericArguments().First().FullName;
public bool IsNullableTypeHasTryParseMethod => IsNullable && Type.GetGenericArguments().First()
.GetMethods(BindingFlags.Public | BindingFlags.Static)
.Any(x => x.Name == "TryParse");
}
>>>>>>>
public bool IsEnum => Type.IsEnum;
public bool IsNullable => Type.IsGenericType && Type.GetGenericTypeDefinition() == typeof(Nullable<>);
public string NullableType => Type.GetGenericArguments().First().FullName;
public bool IsNullableTypeHasTryParseMethod => IsNullable && Type.GetGenericArguments().First()
.GetMethods(BindingFlags.Public | BindingFlags.Static)
.Any(x => x.Name == "TryParse");
} |
<<<<<<<
#if !SILVERLIGHT
[TestClass]
=======
[TestFixture]
>>>>>>>
#if !SILVERLIGHT
[TestFixture] |
<<<<<<<
#if !SILVERLIGHT
[TestMethod]
=======
[Test]
>>>>>>>
#if !SILVERLIGHT
[Test]
<<<<<<<
g.LoadFromFile("InferenceTest.ttl");
=======
FileLoader.Load(g, "resources\\InferenceTest.ttl");
>>>>>>>
FileLoader.Load(g, "resources\\InferenceTest.ttl"); |
<<<<<<<
#if !NO_XMLENTITIES
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_XMLENTITIES
[Test]
<<<<<<<
#if !NO_HTMLAGILITYPACK
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_HTMLAGILITYPACK
[Test]
<<<<<<<
#if !NO_XMLENTITIES
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_XMLENTITIES
[Test]
<<<<<<<
#if !NO_HTMLAGILITYPACK
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_HTMLAGILITYPACK
[Test]
<<<<<<<
#if !NO_XMLENTITIES
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_XMLENTITIES
[Test]
<<<<<<<
#if !NO_HTMLAGILITYPACK
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_HTMLAGILITYPACK
[Test] |
<<<<<<<
#if !NO_SYSTEMCONFIGURATION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYSTEMCONFIGURATION
[Test]
<<<<<<<
#if !NO_SYSTEMCONFIGURATION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYSTEMCONFIGURATION
[Test]
<<<<<<<
#if !NO_SYSTEMCONFIGURATION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYSTEMCONFIGURATION
[Test]
<<<<<<<
#if !NO_SYSTEMCONFIGURATION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYSTEMCONFIGURATION
[Test]
<<<<<<<
#if !NO_SYSTEMCONFIGURATION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYSTEMCONFIGURATION
[Test]
<<<<<<<
#if !NO_SYSTEMCONFIGURATION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYSTEMCONFIGURATION
[Test] |
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_HTMLAGILITYPACK
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_HTMLAGILITYPACK
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_HTMLAGILITYPACK
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_HTMLAGILITYPACK
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_HTMLAGILITYPACK
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_HTMLAGILITYPACK
[Test]
<<<<<<<
#if !NO_HTMLAGILITYPACK
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_HTMLAGILITYPACK
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_HTMLAGILITYPACK
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_HTMLAGILITYPACK
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
[Test]
#if !NO_COMPRESSION
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test]
<<<<<<<
#if !NO_COMPRESSION
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_COMPRESSION
[Test] |
<<<<<<<
#if !PORTABLE
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE
[Test]
<<<<<<<
#if !NO_FILE // No FileLoader
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_FILE // No FileLoader
[Test] |
<<<<<<<
#if !SILVERLIGHT // No SparqlRemoteEndpoint.QueryRaw()
[TestMethod]
=======
[Test]
>>>>>>>
#if !SILVERLIGHT // No SparqlRemoteEndpoint.QueryRaw()
[Test]
<<<<<<<
#if !PORTABLE // No VirtuosoManager in PCL
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE // No VirtuosoManager in PCL
[Test]
<<<<<<<
#if !SILVERLIGHT // No SparqlRemoteEndpoint.QueryRaw()
[TestMethod]
=======
[Test]
>>>>>>>
#if !SILVERLIGHT // No SparqlRemoteEndpoint.QueryRaw()
[Test]
<<<<<<<
g.LoadFromFile("json.owl");
=======
FileLoader.Load(g, "resources\\json.owl");
>>>>>>>
FileLoader.Load(g, "resources\\json.owl");
<<<<<<<
#if !NO_SYNC_HTTP // No SparqlConnector
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP // No SparqlConnector
[Test]
<<<<<<<
g.LoadFromFile("anton.rdf");
=======
FileLoader.Load(g, "resources\\anton.rdf");
>>>>>>>
FileLoader.Load(g, "resources\\anton.rdf"); |
<<<<<<<
//Run manifests
this.RunManifest("resources\\turtle11\\manifest.ttl", posSyntaxTest, negSyntaxTest);
=======
//Nodes for positive and negative tests
Graph g = new Graph();
g.NamespaceMap.AddNamespace("rdft", UriFactory.Create("http://www.w3.org/ns/rdftest#"));
INode posSyntaxTest = g.CreateUriNode("rdft:TestTurtlePositiveSyntax");
INode negSyntaxTest = g.CreateUriNode("rdft:TestTurtleNegativeSyntax");
INode negEvalTest = g.CreateUriNode("rdft:TestTurtleNegativeEval");
>>>>>>>
//Nodes for positive and negative tests
Graph g = new Graph();
g.NamespaceMap.AddNamespace("rdft", UriFactory.Create("http://www.w3.org/ns/rdftest#"));
INode posSyntaxTest = g.CreateUriNode("rdft:TestTurtlePositiveSyntax");
INode negSyntaxTest = g.CreateUriNode("rdft:TestTurtleNegativeSyntax");
INode negEvalTest = g.CreateUriNode("rdft:TestTurtleNegativeEval");
<<<<<<<
[Test]
=======
[TestMethod]
public void ParsingTurtleW3CComplexPrefixedNames10()
{
NTriplesFormatter formatter = new NTriplesFormatter();
Graph ttl = new Graph();
ttl.LoadFromFile(@"turtle11\localName_with_non_leading_extras.ttl");
Assert.IsFalse(ttl.IsEmpty);
Console.WriteLine("Subject from Turtle: " + ttl.Triples.First().Subject.ToString(formatter));
Graph nt = new Graph();
NTriplesParser parser = new NTriplesParser();
parser.Warning += TestTools.WarningPrinter;
nt.LoadFromFile(@"turtle11\localName_with_non_leading_extras.nt", parser);
Assert.IsFalse(nt.IsEmpty);
Console.WriteLine("Subject from NTriples: " + nt.Triples.First().Subject.ToString(formatter));
Assert.AreEqual(ttl.Triples.First().Subject, nt.Triples.First().Subject, "Subjects should be equal");
}
[TestMethod]
>>>>>>>
[Test]
public void ParsingTurtleW3CComplexPrefixedNames10()
{
NTriplesFormatter formatter = new NTriplesFormatter();
Graph ttl = new Graph();
ttl.LoadFromFile(@"turtle11\localName_with_non_leading_extras.ttl");
Assert.IsFalse(ttl.IsEmpty);
Console.WriteLine("Subject from Turtle: " + ttl.Triples.First().Subject.ToString(formatter));
Graph nt = new Graph();
NTriplesParser parser = new NTriplesParser();
parser.Warning += TestTools.WarningPrinter;
nt.LoadFromFile(@"turtle11\localName_with_non_leading_extras.nt", parser);
Assert.IsFalse(nt.IsEmpty);
Console.WriteLine("Subject from NTriples: " + nt.Triples.First().Subject.ToString(formatter));
Assert.AreEqual(ttl.Triples.First().Subject, nt.Triples.First().Subject, "Subjects should be equal");
}
[TestMethod]
<<<<<<<
[Test]
public void ShouldSuccessfullyParseValidTurtleStyleW3CBase()
=======
[TestMethod]
public void ParsingTurtleW3CLiteralEscapes1()
{
Graph g = new Graph();
g.LoadFromFile(@"turtle11\literal_with_escaped_BACKSPACE.ttl");
Assert.IsFalse(g.IsEmpty);
Assert.AreEqual(1, g.Triples.Count);
Triple t = g.Triples.First();
Assert.AreEqual(NodeType.Literal, t.Object.NodeType);
ILiteralNode lit = (ILiteralNode)t.Object;
Assert.AreEqual(1, lit.Value.Length);
}
[TestMethod]
public void ParsingTurtleW3CComplexLiterals1()
{
NTriplesFormatter formatter = new NTriplesFormatter();
Graph ttl = new Graph();
ttl.LoadFromFile(@"turtle11\LITERAL1_ascii_boundaries.ttl");
Assert.IsFalse(ttl.IsEmpty);
Console.WriteLine("Object from Turtle: " + ttl.Triples.First().Object.ToString(formatter));
Graph nt = new Graph();
nt.LoadFromFile(@"turtle11\LITERAL1_ascii_boundaries.nt");
Assert.IsFalse(nt.IsEmpty);
Console.WriteLine("Object from NTriples: " + nt.Triples.First().Object.ToString(formatter));
Assert.AreEqual(ttl.Triples.First().Object, nt.Triples.First().Object, "Objects should be equal");
}
[TestMethod, ExpectedException(typeof(RdfParseException))]
public void ParsingTurtleW3CComplexLiterals2()
{
Graph g = new Graph();
g.LoadFromFile(@"turtle11\turtle-syntax-bad-string-04.ttl");
}
[TestMethod]
public void ParsingTurtleW3CBaseTurtleStyle1()
>>>>>>>
[Test]
public void ParsingTurtleW3CLiteralEscapes1()
{
Graph g = new Graph();
g.LoadFromFile(@"turtle11\literal_with_escaped_BACKSPACE.ttl");
Assert.IsFalse(g.IsEmpty);
Assert.AreEqual(1, g.Triples.Count);
Triple t = g.Triples.First();
Assert.AreEqual(NodeType.Literal, t.Object.NodeType);
ILiteralNode lit = (ILiteralNode)t.Object;
Assert.AreEqual(1, lit.Value.Length);
}
[TestMethod]
public void ParsingTurtleW3CComplexLiterals1()
{
NTriplesFormatter formatter = new NTriplesFormatter();
Graph ttl = new Graph();
ttl.LoadFromFile(@"turtle11\LITERAL1_ascii_boundaries.ttl");
Assert.IsFalse(ttl.IsEmpty);
Console.WriteLine("Object from Turtle: " + ttl.Triples.First().Object.ToString(formatter));
Graph nt = new Graph();
nt.LoadFromFile(@"turtle11\LITERAL1_ascii_boundaries.nt");
Assert.IsFalse(nt.IsEmpty);
Console.WriteLine("Object from NTriples: " + nt.Triples.First().Object.ToString(formatter));
Assert.AreEqual(ttl.Triples.First().Object, nt.Triples.First().Object, "Objects should be equal");
}
[TestMethod, ExpectedException(typeof(RdfParseException))]
public void ParsingTurtleW3CComplexLiterals2()
{
Graph g = new Graph();
g.LoadFromFile(@"turtle11\turtle-syntax-bad-string-04.ttl");
}
[TestMethod]
<<<<<<<
[Test,ExpectedException(typeof(RdfParseException))]
public void ShouldThrowWhenSparqlStyleBaseHasDot()
=======
[TestMethod,ExpectedException(typeof(RdfParseException))]
public void ParsingTurtleW3CBaseTurtleStyle3()
{
//@base is case sensitive in Turtle
String graph = "@BASE <http://example.org/> .";
Graph g = new Graph();
this._parser.Load(g, new StringReader(graph));
}
[TestMethod,ExpectedException(typeof(RdfParseException))]
public void ParsingTurtleW3CBaseSparqlStyle1()
>>>>>>>
[Test,ExpectedException(typeof(RdfParseException))]
public void ParsingTurtleW3CBaseTurtleStyle3()
{
//@base is case sensitive in Turtle
String graph = "@BASE <http://example.org/> .";
Graph g = new Graph();
this._parser.Load(g, new StringReader(graph));
}
[TestMethod,ExpectedException(typeof(RdfParseException))]
public void ParsingTurtleW3CBaseSparqlStyle1()
<<<<<<<
[Test]
public void ShouldSuccessfullyParseValidTurtleStyleW3CPrefix()
=======
[TestMethod]
public void ParsingTurtleW3CBaseSparqlStyle3()
{
//No dot required and case insensitive
String graph = "BaSe <http://example.org/>";
Graph g = new Graph();
this._parser.Load(g, new StringReader(graph));
Assert.AreEqual(new Uri("http://example.org"), g.BaseUri);
}
[TestMethod]
public void ParsingTurtleW3CPrefixTurtleStyle1()
>>>>>>>
[Test]
public void ParsingTurtleW3CBaseSparqlStyle3()
{
//No dot required and case insensitive
String graph = "BaSe <http://example.org/>";
Graph g = new Graph();
this._parser.Load(g, new StringReader(graph));
Assert.AreEqual(new Uri("http://example.org"), g.BaseUri);
}
[TestMethod]
public void ParsingTurtleW3CPrefixTurtleStyle1()
<<<<<<<
[Test, ExpectedException(typeof(RdfParseException))]
public void ShouldThrowWhenSparqlStylePrefixHasDot()
=======
[TestMethod, ExpectedException(typeof(RdfParseException))]
public void ParsingTurtleW3CPrefixTurtleStyle3()
{
//@prefix is case sensitive in Turtle
String graph = "@PREFIX ex: <http://example.org/> .";
Graph g = new Graph();
this._parser.Load(g, new StringReader(graph));
}
[TestMethod, ExpectedException(typeof(RdfParseException))]
public void ParsingTurtleW3CPrefixSparqlStyle1()
>>>>>>>
[Test, ExpectedException(typeof(RdfParseException))]
public void ParsingTurtleW3CPrefixTurtleStyle3()
{
//@prefix is case sensitive in Turtle
String graph = "@PREFIX ex: <http://example.org/> .";
Graph g = new Graph();
this._parser.Load(g, new StringReader(graph));
}
[TestMethod, ExpectedException(typeof(RdfParseException))]
public void ParsingTurtleW3CPrefixSparqlStyle1() |
<<<<<<<
=======
/// <summary>
/// See <see cref="IGraphPatternBuilder.Child(Action{IGraphPatternBuilder})"/>
/// </summary>
public static IQueryBuilder Child(this IDescribeBuilder describeBuilder, Action<IGraphPatternBuilder> buildGraphPattern)
{
return describeBuilder.GetQueryBuilder().Child(buildGraphPattern);
}
/// <summary>
/// See <see cref="IGraphPatternBuilder.Where(VDS.RDF.Query.Patterns.ITriplePattern[])"/>
/// </summary>
>>>>>>>
/// <summary>
/// See <see cref="IGraphPatternBuilder.Where(VDS.RDF.Query.Patterns.ITriplePattern[])"/>
/// </summary> |
<<<<<<<
#if !SILVERLIGHT
[TestMethod]
=======
[Test]
>>>>>>>
#if !SILVERLIGHT
[Test]
<<<<<<<
#if !SILVERLIGHT
[TestMethod]
=======
[Test]
>>>>>>>
#if !SILVERLIGHT
[Test]
<<<<<<<
#if !SILVERLIGHT
[TestMethod]
=======
[Test]
>>>>>>>
#if !SILVERLIGHT
[Test]
<<<<<<<
ex.LoadFromFile("InferenceTest.ttl");
=======
FileLoader.Load(ex, "resources\\InferenceTest.ttl");
>>>>>>>
FileLoader.Load(ex, "resources\\InferenceTest.ttl");
<<<<<<<
ex.LoadFromFile("InferenceTest.ttl");
=======
FileLoader.Load(ex, "resources\\InferenceTest.ttl");
>>>>>>>
FileLoader.Load(ex, "resources\\InferenceTest.ttl");
<<<<<<<
ex.LoadFromFile("InferenceTest.ttl");
=======
FileLoader.Load(ex, "resources\\InferenceTest.ttl");
>>>>>>>
FileLoader.Load(ex, "resources\\InferenceTest.ttl");
<<<<<<<
ex.LoadFromFile("InferenceTest.ttl");
=======
FileLoader.Load(ex, "resources\\InferenceTest.ttl");
>>>>>>>
FileLoader.Load(ex, "resources\\InferenceTest.ttl");
<<<<<<<
ex.LoadFromFile("InferenceTest.ttl");
=======
FileLoader.Load(ex, "resources\\InferenceTest.ttl");
>>>>>>>
FileLoader.Load(ex, "resources\\InferenceTest.ttl"); |
<<<<<<<
#if !NO_FILE
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_FILE
[Test]
<<<<<<<
#if !SILVERLIGHT
[TestMethod]
=======
[Test]
>>>>>>>
#if !SILVERLIGHT
[Test] |
<<<<<<<
using UnityEditor.Experimental.UIElements.GraphView;
using UnityEngine;
=======
using UnityEngine;
>>>>>>>
using UnityEngine;
using UnityEditor.Experimental.UIElements.GraphView; |
<<<<<<<
[Test]
public void WritingCharEscaping()
{
List<IRdfReader> readers = new List<IRdfReader>()
{
new TurtleParser(),
new Notation3Parser()
};
List<IRdfWriter> writers = new List<IRdfWriter>()
{
new CompressingTurtleWriter(WriterCompressionLevel.High),
new Notation3Writer()
};
for (int i = 0; i < readers.Count; i++)
{
IRdfReader parser = readers[i];
IRdfWriter writer = writers[i];
foreach (String sample in samples)
{
Graph g = new Graph();
Console.WriteLine("Original RDF Fragment");
Console.WriteLine(prefix + sample);
StringParser.Parse(g, prefix + sample, parser);
Console.WriteLine();
Console.WriteLine("Triples in Original");
foreach (Triple t in g.Triples)
{
Console.WriteLine(t.ToString());
}
Console.WriteLine();
String serialized = VDS.RDF.Writing.StringWriter.Write(g, writer);
Console.WriteLine("Serialized RDF Fragment");
Console.WriteLine(serialized);
Graph h = new Graph();
StringParser.Parse(h, serialized, parser);
Console.WriteLine();
Console.WriteLine("Triples in Serialized");
foreach (Triple t in g.Triples)
{
Console.WriteLine(t.ToString());
}
Console.WriteLine();
Assert.AreEqual(g, h, "Graphs should have been equal");
Console.WriteLine("Graphs were equal as expected");
Console.WriteLine();
}
}
}
[Test]
public void WritingNTriplesCharEscaping()
{
TurtleParser parser = new TurtleParser();
NTriplesParser ntparser = new NTriplesParser();
NTriplesWriter ntwriter = new NTriplesWriter();
foreach (String sample in samples)
{
Graph g = new Graph();
Console.WriteLine("Original RDF Fragment");
Console.WriteLine(prefix + sample);
StringParser.Parse(g, prefix + sample, parser);
Console.WriteLine();
Console.WriteLine("Triples in Original");
foreach (Triple t in g.Triples)
{
Console.WriteLine(t.ToString());
}
Console.WriteLine();
String serialized = VDS.RDF.Writing.StringWriter.Write(g, ntwriter);
Console.WriteLine("Serialized RDF Fragment");
Console.WriteLine(serialized);
Graph h = new Graph();
StringParser.Parse(h, serialized, ntparser);
Console.WriteLine();
Console.WriteLine("Triples in Serialized");
foreach (Triple t in g.Triples)
{
Console.WriteLine(t.ToString());
}
Console.WriteLine();
Assert.AreEqual(g, h, "Graphs should have been equal");
Console.WriteLine("Graphs were equal as expected");
Console.WriteLine();
}
}
[Test]
=======
[TestMethod]
>>>>>>>
[Test]
<<<<<<<
[Test]
public void WritingBackslashEscaping()
{
Graph g = new Graph();
INode subj = g.CreateBlankNode();
INode pred = g.CreateUriNode(new Uri("ex:string"));
INode obj = g.CreateLiteralNode(@"C:\Program Files\some\path\\to\file.txt");
g.Assert(subj, pred, obj);
obj = g.CreateLiteralNode(@"\");
g.Assert(subj, pred, obj);
obj = g.CreateLiteralNode(@"C:\\new\\real\\ugly\\Under has all the possible escape character interactions");
g.Assert(subj, pred, obj);
List<IRdfWriter> writers = new List<IRdfWriter>()
{
new NTriplesWriter(),
new TurtleWriter(),
new CompressingTurtleWriter(WriterCompressionLevel.High),
new Notation3Writer()
};
List<IRdfReader> parsers = new List<IRdfReader>()
{
new NTriplesParser(),
new TurtleParser(),
new TurtleParser(),
new Notation3Parser()
};
Console.WriteLine("Original Graph");
TestTools.ShowGraph(g);
Console.WriteLine();
for (int i = 0; i < writers.Count; i++)
{
IRdfWriter writer = writers[i];
Console.WriteLine("Testing Writer " + writer.GetType().Name);
System.IO.StringWriter strWriter = new System.IO.StringWriter();
writer.Save(g, strWriter);
Console.WriteLine("Written as:");
Console.WriteLine(strWriter.ToString());
Console.WriteLine();
Graph h = new Graph();
StringParser.Parse(h, strWriter.ToString(), parsers[i]);
Console.WriteLine("Parsed Graph");
TestTools.ShowGraph(h);
Console.WriteLine();
Assert.AreEqual(g, h, "Graphs should be equal");
}
}
[Test]
=======
[TestMethod]
>>>>>>>
[Test] |
<<<<<<<
#if !NO_SYNC_HTTP // Test requires synchronous APIs
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP // Test requires synchronous APIs
[Test]
<<<<<<<
#if !PORTABLE // No VirutousoManager in PCL
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE // No VirutousoManager in PCL
[Test]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod]
=======
[Test]
>>>>>>>
[Test]
#if !NO_SYNC_HTTP
<<<<<<<
#if !PORTABLE
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE
[Test]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP
[Test]
<<<<<<<
#if !PORTABLE
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE
[Test]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP
[Test]
<<<<<<<
#if !PORTABLE
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE
[Test]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP
[Test]
<<<<<<<
#if !PORTABLE
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE
[Test]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP
[Test]
<<<<<<<
#if !PORTABLE
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE
[Test]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP
[Test]
<<<<<<<
#if !PORTABLE
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE
[Test]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP
[Test]
<<<<<<<
#if !PORTABLE // No VirtuosoManager in PCL
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE // No VirtuosoManager in PCL
[Test]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP
[Test]
<<<<<<<
#if !PORTABLE // No VirtuosoManager in PCL
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE // No VirtuosoManager in PCL
[Test]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP
[Test]
<<<<<<<
#if !PORTABLE // No VirtuosoManager in PCL
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE // No VirtuosoManager in PCL
[Test]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP
[Test]
<<<<<<<
#if !PORTABLE // No VirtuosoManager in PCL
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE // No VirtuosoManager in PCL
[Test]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP
[Test]
<<<<<<<
#if !PORTABLE // No VirtuosoManager in PCL
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE // No VirtuosoManager in PCL
[Test]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP
[Test]
<<<<<<<
#if !PORTABLE // No VirtuosoManager in PCL
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE // No VirtuosoManager in PCL
[Test]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP
[Test]
<<<<<<<
#if !PORTABLE // No VirtuosoManager in PCL
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE // No VirtuosoManager in PCL
[Test]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod, ExpectedException(typeof(RdfQueryException))]
=======
[Test, ExpectedException(typeof(RdfQueryException))]
>>>>>>>
#if !NO_SYNC_HTTP
[Test, ExpectedException(typeof(RdfQueryException))]
<<<<<<<
#if !PORTABLE // No VirtuosoManager in PCL
[TestMethod, ExpectedException(typeof(RdfQueryException))]
=======
[Test, ExpectedException(typeof(RdfQueryException))]
>>>>>>>
#if !PORTABLE // No VirtuosoManager in PCL
[Test, ExpectedException(typeof(RdfQueryException))]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP
[Test]
<<<<<<<
#if !PORTABLE // No VirtuosoManager in PCL
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE // No VirtuosoManager in PCL
[Test]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP
[Test]
<<<<<<<
#if !PORTABLE // No VirtuosoManager in PCL
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE // No VirtuosoManager in PCL
[Test]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP
[Test]
<<<<<<<
#if !PORTABLE // No VirtuosoManager in PCL
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE // No VirtuosoManager in PCL
[Test]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP
[Test]
<<<<<<<
#if !PORTABLE // No VirtuosoManager in PCL
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE // No VirtuosoManager in PCL
[Test]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod, ExpectedException(typeof(SparqlUpdateException))]
=======
[Test, ExpectedException(typeof(SparqlUpdateException))]
>>>>>>>
#if !NO_SYNC_HTTP
[Test, ExpectedException(typeof(SparqlUpdateException))]
<<<<<<<
#if !PORTABLE // No VirtuosoManager in PCL
[TestMethod, ExpectedException(typeof(SparqlUpdateException))]
=======
[Test, ExpectedException(typeof(SparqlUpdateException))]
>>>>>>>
#if !PORTABLE // No VirtuosoManager in PCL
[Test, ExpectedException(typeof(SparqlUpdateException))]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP
[Test]
<<<<<<<
#if !PORTABLE
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE
[Test] |
<<<<<<<
// <summary>
// Constructs a <see cref="LazyInternalContext" /> for the given <see cref="DbContext" /> owner that will be initialized
// on first use.
// </summary>
// <param name="owner">
// The owner <see cref="DbContext" /> .
// </param>
// <param name="internalConnection"> Responsible for creating a connection lazily when the context is used for the first time. </param>
// <param name="model"> The model, or null if it will be created by convention </param>
=======
private DbModel _modelBeingInitialized;
/// <summary>
/// Constructs a <see cref="LazyInternalContext" /> for the given <see cref="DbContext" /> owner that will be initialized
/// on first use.
/// </summary>
/// <param name="owner">
/// The owner <see cref="DbContext" /> .
/// </param>
/// <param name="internalConnection"> Responsible for creating a connection lazily when the context is used for the first time. </param>
/// <param name="model"> The model, or null if it will be created by convention </param>
>>>>>>>
private DbModel _modelBeingInitialized;
// <summary>
// Constructs a <see cref="LazyInternalContext" /> for the given <see cref="DbContext" /> owner that will be initialized
// on first use.
// </summary>
// <param name="owner">
// The owner <see cref="DbContext" /> .
// </param>
// <param name="internalConnection"> Responsible for creating a connection lazily when the context is used for the first time. </param>
// <param name="model"> The model, or null if it will be created by convention </param>
<<<<<<<
// <summary>
// Returns the underlying <see cref="ObjectContext" /> without causing the underlying database to be created
// or the database initialization strategy to be executed.
// This is used to get a context that can then be used for database creation/initialization.
// </summary>
=======
public override DbModel ModelBeingInitialized
{
get
{
InitializeContext();
return _modelBeingInitialized;
}
}
/// <summary>
/// Returns the underlying <see cref="ObjectContext" /> without causing the underlying database to be created
/// or the database initialization strategy to be executed.
/// This is used to get a context that can then be used for database creation/initialization.
/// </summary>
>>>>>>>
public override DbModel ModelBeingInitialized
{
get
{
InitializeContext();
return _modelBeingInitialized;
}
}
// <summary>
// Returns the underlying <see cref="ObjectContext" /> without causing the underlying database to be created
// or the database initialization strategy to be executed.
// This is used to get a context that can then be used for database creation/initialization.
// </summary> |
<<<<<<<
#if !PORTABLE // No VirtuosoManager in PCL
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE // No VirtuosoManager in PCL
[Test]
<<<<<<<
#if !NO_SYNC_HTTP // Require Sync interface for test
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP // Require Sync interface for test
[Test]
<<<<<<<
#if !NO_SYNC_HTTP // Test requires synchronous APIs
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP // Test requires synchronous APIs
[Test]
<<<<<<<
#if !PORTABLE // No VirtuousoManager in PCL
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE // No VirtuousoManager in PCL
[Test]
<<<<<<<
#if !NO_SYNC_HTTP // Test requires synchronous APIs
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP // Test requires synchronous APIs
[Test]
<<<<<<<
#if !NO_SYNC_HTTP
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_SYNC_HTTP
[Test]
<<<<<<<
#if !PORTABLE // No VirtuosoManager in PCL
[TestMethod]
=======
[Test]
>>>>>>>
#if !PORTABLE // No VirtuosoManager in PCL
[Test] |
<<<<<<<
parent.LoadFromFile("InferenceTest.ttl");
=======
FileLoader.Load(parent, "resources\\InferenceTest.ttl");
>>>>>>>
FileLoader.Load(parent, "resources\\InferenceTest.ttl");
<<<<<<<
parent.LoadFromFile("Turtle.ttl");
=======
FileLoader.Load(parent, "resources\\Turtle.ttl");
>>>>>>>
FileLoader.Load(parent, "resources\\Turtle.ttl");
<<<<<<<
#if !NO_DATA
[TestMethod]
=======
[Test]
>>>>>>>
#if !NO_DATA
[Test]
<<<<<<<
g.LoadFromFile("InferenceTest.ttl");
=======
FileLoader.Load(g, "resources\\InferenceTest.ttl");
>>>>>>>
g.LoadFromFile("InferenceTest.ttl");
FileLoader.Load(g, "resources\\InferenceTest.ttl"); |
<<<<<<<
[Test]
public void WritingStringBackslashEscapingTurtle()
=======
[TestMethod]
public void WritingStringBackslashEscapingTurtle1()
>>>>>>>
[Test]
public void WritingStringBackslashEscapingTurtle1()
<<<<<<<
[Test]
public void WritingStringBackslashEscapingNotation3()
=======
[TestMethod]
public void WritingStringBackslashEscapingTurtle2()
>>>>>>>
[Test]
public void WritingStringBackslashEscapingTurtle2()
<<<<<<<
[Test]
public void WritingStringBackslashEscapingSparql()
=======
[TestMethod]
public void WritingStringBackslashEscapingNotation3_1()
>>>>>>>
[Test]
public void WritingStringBackslashEscapingNotation3_1()
<<<<<<<
[Test]
public void WritingStringIsFullyEscaped()
=======
[TestMethod]
public void WritingStringBackslashEscapingNotation3_2()
>>>>>>>
[Test]
public void WritingStringBackslashEscapingNotation3_2()
<<<<<<<
[Test]
public void WritingStringEscapeCharacters()
=======
[TestMethod]
public void WritingStringBackslashEscapingSparql()
>>>>>>>
[Test]
public void WritingStringBackslashEscapingSparql()
<<<<<<<
[Test]
public void WritingStringEscapeNewLines()
{
String test = "Has a \n new line";
Console.WriteLine("Original Value - " + test);
String result = test.Escape('\n', 'n');
Console.WriteLine("Escaped Value - " + result);
String test2 = "Has a \\n new line escape";
Console.WriteLine("Original Value - " + test2);
String result2 = test2.Escape('\n', 'n');
Console.WriteLine("Escaped Value - " + result2);
}
public void CheckEscapes(String value, char[] cs)
=======
[TestMethod]
public void WritingStringBackslashEscapingTsv()
>>>>>>>
[Test]
public void WritingStringBackslashEscapingTsv() |
<<<<<<<
this.clientRepository.Create(client);
TempData["Message"] = "Client Created";
return RedirectToAction("Edit", new { id = client.ID });
=======
this.clientRepository.Create(model);
TempData["Message"] = Resources.OAuthClientController.ClientCreated;
return RedirectToAction("Edit", new { id = model.ID });
>>>>>>>
this.clientRepository.Create(client);
TempData["Message"] = Resources.OAuthClientController.ClientCreated;
return RedirectToAction("Edit", new { id = client.ID });
<<<<<<<
this.clientRepository.Update(client);
TempData["Message"] = "Client updated";
return RedirectToAction("Edit", new { id = client.ID });
=======
this.clientRepository.Update(model);
TempData["Message"] = Resources.OAuthClientController.ClientUpdated;
return RedirectToAction("Edit", new { id = model.ID });
>>>>>>>
this.clientRepository.Update(client);
TempData["Message"] = Resources.OAuthClientController.ClientUpdated;
return RedirectToAction("Edit", new { id = client.ID }); |
<<<<<<<
else if (keyboard_preference == PreferredKeyboard.Logitech_G213)
layoutConfigPath = Path.Combine(layoutsPath, "logitech_g213.json");
else if (keyboard_preference == PreferredKeyboard.Logitech_G815)
layoutConfigPath = Path.Combine(layoutsPath, "logitech_g815.json");
else if (keyboard_preference == PreferredKeyboard.Logitech_G513)
layoutConfigPath = Path.Combine(layoutsPath, "logitech_g513.json");
=======
else if (keyboard_preference == PreferredKeyboard.Logitech_G213)
layoutConfigPath = Path.Combine(layoutsPath, "logitech_g213.json");
>>>>>>>
else if (keyboard_preference == PreferredKeyboard.Logitech_G213)
layoutConfigPath = Path.Combine(layoutsPath, "logitech_g213.json");
else if (keyboard_preference == PreferredKeyboard.Logitech_G815)
layoutConfigPath = Path.Combine(layoutsPath, "logitech_g815.json");
else if (keyboard_preference == PreferredKeyboard.Logitech_G513)
layoutConfigPath = Path.Combine(layoutsPath, "logitech_g513.json");
else if (keyboard_preference == PreferredKeyboard.Logitech_G213)
layoutConfigPath = Path.Combine(layoutsPath, "logitech_g213.json"); |
<<<<<<<
public event PropertyChangedEventHandler PropertyChanged;
=======
public LightEventConfig WithLayer<T>() where T : ILayerHandler {
ExtraAvailableLayers.Add(typeof(T));
return this;
}
>>>>>>>
public event PropertyChangedEventHandler PropertyChanged;
public LightEventConfig WithLayer<T>() where T : ILayerHandler {
ExtraAvailableLayers.Add(typeof(T));
return this;
}
<<<<<<<
=======
protected void InvokePropertyChanged(object oldValue, object newValue, [CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedExEventArgs(propertyName, oldValue, newValue));
}
/// <summary>Enables the use of a non-default layer for this application.</summary>
protected void AllowLayer<T>() where T : ILayerHandler => Config.WithLayer<T>();
/// <summary>Determines if the given layer handler type can be used by this application. This is the case either if it is a default handler or has explicitly been allowed for this application.</summary>
public bool IsAllowedLayer(Type type) => Global.LightingStateManager.LayerHandlers.TryGetValue(type, out var def) && (def.IsDefault || Config.ExtraAvailableLayers.Contains(type));
/// <summary>Gets a list of layers that are allowed to be used by this application.</summary>
public IEnumerable<LayerHandlerMeta> AllowedLayers
=> Global.LightingStateManager.LayerHandlers.Values.Where(val => val.IsDefault || Config.ExtraAvailableLayers.Contains(val.Type));
>>>>>>>
/// <summary>Enables the use of a non-default layer for this application.</summary>
protected void AllowLayer<T>() where T : ILayerHandler => Config.WithLayer<T>();
/// <summary>Determines if the given layer handler type can be used by this application. This is the case either if it is a default handler or has explicitly been allowed for this application.</summary>
public bool IsAllowedLayer(Type type) => Global.LightingStateManager.LayerHandlers.TryGetValue(type, out var def) && (def.IsDefault || Config.ExtraAvailableLayers.Contains(type));
/// <summary>Gets a list of layers that are allowed to be used by this application.</summary>
public IEnumerable<LayerHandlerMeta> AllowedLayers
=> Global.LightingStateManager.LayerHandlers.Values.Where(val => val.IsDefault || Config.ExtraAvailableLayers.Contains(val.Type)); |
<<<<<<<
_ID = "Ambilight";
Initialize();
captureTimer = new Timer(GetIntervalFromFPS(Properties.AmbiLightUpdatesPerSecond));
captureTimer.Elapsed += TakeScreenshot;
=======
if (captureTimer == null)
{
this.Initialize();
}
>>>>>>>
Initialize();
captureTimer = new Timer(GetIntervalFromFPS(Properties.AmbiLightUpdatesPerSecond));
captureTimer.Elapsed += TakeScreenshot; |
<<<<<<<
devices.Add(new DeviceContainer(new Devices.Uni.KeyboardDevice()));
=======
devices.Add(new DeviceContainer(new Devices.Ducky.DuckyDevice())); //Ducky Device
>>>>>>>
devices.Add(new DeviceContainer(new Devices.Uni.KeyboardDevice()));
devices.Add(new DeviceContainer(new Devices.Ducky.DuckyDevice())); //Ducky Device |
<<<<<<<
if (!variable.IsEvaluated())
variable.Evaluate();
return variable.GetValue();
=======
lock (locker)
{
if (!variable.IsEvaluated())
{
var stopWatch = new Stopwatch();
stopWatch.Start();
variable.GetValue();
Trace.WriteLineIf(Extensibility.NBiTraceSwitch.TraceInfo, $"Time needed for the evaluation of the variable '{args.VariableName}': {stopWatch.Elapsed.ToString(@"d\d\.hh\h\:mm\m\:ss\s\ \+fff\m\s")}");
}
}
var output = variable.GetValue();
return output;
>>>>>>>
lock (locker)
{
if (!variable.IsEvaluated())
variable.Evaluate();
}
return variable.GetValue(); |
<<<<<<<
using NBi.Framework.FailureMessage.Markdown;
=======
using NBi.Core.ResultSet.Resolver.Query;
>>>>>>>
using NBi.Framework.FailureMessage.Markdown;
using NBi.Core.ResultSet.Resolver.Query; |
<<<<<<<
public ISequenceResolver Resolver { get; set; }
=======
public ISequenceResolver<object> Resolver { get; set; }
public IEnumerable<string> Categories { get; set; } = new List<string>();
public IDictionary<string, string> Traits { get; set; } = new Dictionary<string, string>();
>>>>>>>
public ISequenceResolver Resolver { get; set; }
public IEnumerable<string> Categories { get; set; } = new List<string>();
public IDictionary<string, string> Traits { get; set; } = new Dictionary<string, string>(); |
<<<<<<<
/// <summary>FFXIV_ACT_Plugin.MemoryScanSettings</summary>
private dynamic pluginConfig;
/// <summary>FFXIV_ACT_Plugin.Memory.Memory</summary>
private dynamic pluginMemory;
/// <summary>FFXIV_ACT_Plugin.Memory.ScanCombatants</summary>
private dynamic pluginScancombat;
/// <summary>FFXIV_ACT_Plugin.Parse.LogParse</summary>
private dynamic pluginLogParse;
/// <summary>
/// ACTプラグイン型のプラグインオブジェクトのインスタンス
/// </summary>
public IActPluginV1 ActPlugin => (IActPluginV1)this.plugin;
public System.Action ActPluginAttachedCallback { get; set; }
=======
private IActPluginV1 ActPlugin => (IActPluginV1)this.plugin;
>>>>>>>
/// <summary>
/// ACTプラグイン型のプラグインオブジェクトのインスタンス
/// </summary>
public IActPluginV1 ActPlugin => (IActPluginV1)this.plugin;
public System.Action ActPluginAttachedCallback { get; set; }
<<<<<<<
if (ffxivPlugin != null)
{
this.plugin = ffxivPlugin;
AppLogger.Trace("attached ffxiv plugin.");
this.ActPluginAttachedCallback?.Invoke();
=======
AppLogger.Trace("attached ffxiv plugin.");
}
>>>>>>>
if (ffxivPlugin != null)
{
this.plugin = ffxivPlugin;
AppLogger.Trace("attached ffxiv plugin.");
this.ActPluginAttachedCallback?.Invoke();
}
} |
<<<<<<<
var regex = CodeCommentHelper.GetCommentRegex("CSharp", !string.IsNullOrEmpty(prefix));
var formatter = new CommentFormatter(line, prefix, 4, regex);
=======
var regex = CodeCommentHelper.GetCommentRegex(CodeLanguage.CSharp, false);
var formatter = new CommentFormatter(line, string.Empty, 4, regex);
>>>>>>>
var regex = CodeCommentHelper.GetCommentRegex(CodeLanguage.CSharp, !string.IsNullOrEmpty(prefix));
var formatter = new CommentFormatter(line, prefix, 4, regex); |
<<<<<<<
ParseAlternativeNode.DownToTop(nodes, RemoveChildrenIfAllChildrenIsEmpty);
//ParseAlternativesVisializer.PrintParseAlternatives(parseResult, nodes, skipCount, "After RemoveChildrenIfAllChildrenIsEmpty.");
=======
ParseAlternativeNode.TopToDown(nodes, RemoveChildrenIfAllChildrenIsEmpty);
//ParseAlternativesVisializer.PrintParseAlternatives(parser, nodes, skipCount, "After RemoveChildrenIfAllChildrenIsEmpty.");
>>>>>>>
ParseAlternativeNode.TopToDown(nodes, RemoveChildrenIfAllChildrenIsEmpty);
//ParseAlternativesVisializer.PrintParseAlternatives(parseResult, nodes, skipCount, "After RemoveChildrenIfAllChildrenIsEmpty."); |
<<<<<<<
this.menuFileOpenViewer = new System.Windows.Forms.MenuItem();
=======
this.menuObjectBindMoniker = new System.Windows.Forms.MenuItem();
>>>>>>>
this.menuFileOpenViewer = new System.Windows.Forms.MenuItem();
this.menuObjectBindMoniker = new System.Windows.Forms.MenuItem();
<<<<<<<
// menuFileOpenViewer
//
this.menuFileOpenViewer.Index = 1;
this.menuFileOpenViewer.Text = "Open 32 Bit Viewer";
this.menuFileOpenViewer.Click += new System.EventHandler(this.menuFileOpenViewer_Click);
//
=======
// menuObjectBindMoniker
//
this.menuObjectBindMoniker.Index = 4;
this.menuObjectBindMoniker.Text = "Bind Moniker";
this.menuObjectBindMoniker.Click += new System.EventHandler(this.menuObjectBindMoniker_Click);
//
>>>>>>>
// menuFileOpenViewer
//
this.menuFileOpenViewer.Index = 1;
this.menuFileOpenViewer.Text = "Open 32 Bit Viewer";
this.menuFileOpenViewer.Click += new System.EventHandler(this.menuFileOpenViewer_Click);
// menuObjectBindMoniker
//
this.menuObjectBindMoniker.Index = 4;
this.menuObjectBindMoniker.Text = "Bind Moniker";
this.menuObjectBindMoniker.Click += new System.EventHandler(this.menuObjectBindMoniker_Click);
//
<<<<<<<
private System.Windows.Forms.MenuItem menuFileOpenViewer;
=======
private System.Windows.Forms.MenuItem menuObjectBindMoniker;
>>>>>>>
private System.Windows.Forms.MenuItem menuFileOpenViewer;
private System.Windows.Forms.MenuItem menuObjectBindMoniker; |
<<<<<<<
this.AutoScaleDimensions = new System.Drawing.SizeF(14F, 29F);
=======
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
>>>>>>>
this.AutoScaleDimensions = new System.Drawing.SizeF(14F, 29F);
<<<<<<<
this.ClientSize = new System.Drawing.Size(1920, 999);
=======
this.ClientSize = new System.Drawing.Size(1234, 689);
>>>>>>>
this.ClientSize = new System.Drawing.Size(1920, 999);
<<<<<<<
this.Margin = new System.Windows.Forms.Padding(7);
=======
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
>>>>>>>
this.Margin = new System.Windows.Forms.Padding(7);
<<<<<<<
private System.Windows.Forms.MenuItem menuViewStorage;
=======
private System.Windows.Forms.MenuItem menuRegistryRuntimeClasses;
>>>>>>>
private System.Windows.Forms.MenuItem menuViewStorage;
private System.Windows.Forms.MenuItem menuRegistryRuntimeClasses; |
<<<<<<<
=======
using System;
>>>>>>> |
<<<<<<<
public abstract class Doc : IConfigurable, IConfigurationPersistent, IEquatable<Doc>, IEnumerable<Object>, IValidatable, IJSONWritable, IJSONReadable
=======
public abstract class Doc : IDataDoc, IJSONWritable
>>>>>>>
public abstract class Doc : IDataDoc, IJSONWritable, IJSONReadable |
<<<<<<<
public bool IsValidPrefix(KeySequence sequence)
=======
public bool IsValidPrefix(List<Key> sequence, bool ignore_case)
>>>>>>>
public bool IsValidPrefix(KeySequence sequence, bool ignore_case)
<<<<<<<
public bool IsValidSequence(KeySequence sequence)
=======
public bool IsValidSequence(List<Key> sequence, bool ignore_case)
>>>>>>>
public bool IsValidSequence(KeySequence sequence, bool ignore_case) |
<<<<<<<
=======
// Remember when the user touched a key for the last time
m_last_key_time = DateTime.Now;
// Do nothing if we are disabled
if (m_disabled)
{
return false;
}
>>>>>>>
// Remember when the user touched a key for the last time
m_last_key_time = DateTime.Now;
// Do nothing if we are disabled; NOTE: this disables stats, too
if (m_disabled)
{
return false;
}
<<<<<<<
/// <summary>
/// A buffer used to retrieve the global key state
/// </summary>
private static byte[] m_keystate = new byte[256];
/// <summary>
/// The sequence being currently typed
/// </summary>
private static KeySequence m_sequence = new KeySequence();
private static Key m_last_key = null;
=======
private static List<Key> m_sequence = new List<Key>();
>>>>>>>
/// <summary>
/// The sequence being currently typed
/// </summary>
private static KeySequence m_sequence = new KeySequence();
private static Key m_last_key = null;
<<<<<<<
=======
private static Dictionary<string, int> m_possible_dead_keys;
private static List<int> m_dead_keys = new List<int>();
>>>>>>>
private static Dictionary<string, int> m_possible_dead_keys;
private static List<int> m_dead_keys = new List<int>(); |
<<<<<<<
else
{
// This appears to be a non-printable, non-dead key
key = new Key(vk);
}
if (is_keydown)
{
// Update single key statistics
Stats.AddKey(key);
// Update key pair statistics if applicable
if (DateTime.Now < m_last_key_time.AddMilliseconds(2000)
&& m_last_key != null)
{
Stats.AddPair(m_last_key, key);
}
// Remember when we pressed a key for the last time
m_last_key_time = DateTime.Now;
m_last_key = key;
}
Log("Key {0}: {1}", is_keydown ? "Down" : "Up", key.FriendlyName);
=======
>>>>>>>
if (is_keydown)
{
// Update single key statistics
Stats.AddKey(key);
// Update key pair statistics if applicable
if (DateTime.Now < m_last_key_time.AddMilliseconds(2000)
&& m_last_key != null)
{
Stats.AddPair(m_last_key, key);
}
// Remember when we pressed a key for the last time
m_last_key_time = DateTime.Now;
m_last_key = key;
}
Log("Key {0}: {1}", is_keydown ? "Down" : "Up", key.FriendlyName);
<<<<<<<
KeySequence old_sequence = new KeySequence(m_sequence);
m_sequence.Add(key);
if (Settings.IsValidPrefix(m_sequence))
=======
if (Settings.IsValidPrefix(m_sequence, ignore_case))
>>>>>>>
if (Settings.IsValidPrefix(m_sequence, ignore_case))
<<<<<<<
string tosend = Settings.GetSequenceResult(m_sequence);
Stats.AddSequence(m_sequence);
=======
string tosend = Settings.GetSequenceResult(m_sequence,
ignore_case);
>>>>>>>
string tosend = Settings.GetSequenceResult(m_sequence,
ignore_case);
Stats.AddSequence(m_sequence);
<<<<<<<
string tosend = Settings.GetSequenceResult(old_sequence);
Stats.AddSequence(old_sequence);
=======
string tosend = Settings.GetSequenceResult(old_sequence,
ignore_case);
>>>>>>>
string tosend = Settings.GetSequenceResult(old_sequence,
ignore_case);
Stats.AddSequence(old_sequence); |
<<<<<<<
public CityCollection(MapInfo mapInfo, CityInfo[] cities) : base(0, 0)
{
_mapInfo = mapInfo;
_cities = cities;
if (FileManager.ClientVersion == ClientVersions.CV_70130)
{
Add(new GumpPic(5, 5, _mapInfo.Gump, 0));
Add(new GumpPic(0, 0, 0x15DF, 0));
}
else
{
Add(new GumpPic(0, 0, 0x1598, 0));
}
var width = 393;
=======
public CityCollection(MapInfo mapInfo, CityInfo[] cities) : base(0, 0)
{
_mapInfo = mapInfo;
_cities = cities;
if (mapInfo.Index == 0 || mapInfo.Index == 3)
{
var texture = FileManager.Gumps.GetTexture(mapInfo.Gump);
if (texture == null)
{
SkipSection = true;
return;
}
else
texture.Dispose();
}
Add(new GumpPic(5, 5, _mapInfo.Gump, 0));
Add(new GumpPic(0, 0, 0x15DF, 0));
var width = 393;
>>>>>>>
public CityCollection(MapInfo mapInfo, CityInfo[] cities) : base(0, 0)
{
_mapInfo = mapInfo;
_cities = cities;
if (mapInfo.Index == 0 || mapInfo.Index == 3)
{
var texture = FileManager.Gumps.GetTexture(mapInfo.Gump);
if (texture == null)
{
SkipSection = true;
return;
}
else
texture.Dispose();
}
if (FileManager.ClientVersion == ClientVersions.CV_70130)
{
Add(new GumpPic(5, 5, _mapInfo.Gump, 0));
Add(new GumpPic(0, 0, 0x15DF, 0));
}
else
{
Add(new GumpPic(0, 0, 0x1598, 0));
}
var width = 393; |
<<<<<<<
private TopBarGump _topBarGump;
=======
private StaticManager _staticManager;
>>>>>>>
private TopBarGump _topBarGump;
private StaticManager _staticManager;
<<<<<<<
_topBarGump.Dispose();
=======
Service.Unregister<GameScene>();
>>>>>>>
_topBarGump.Dispose();
Service.Unregister<GameScene>(); |
<<<<<<<
StbTextBox entry = (StbTextBox) sender;
=======
TextBox entry = (TextBox) sender;
bool send = false;
>>>>>>>
StbTextBox entry = (StbTextBox) sender;
bool send = false;
<<<<<<<
entry.Text = "0";
=======
entry.SetText("0");
if ((int) entry.Tag == 0)
{
if (my_gold_entry != 0)
{
my_gold_entry = 0;
send = true;
}
}
else if (my_plat_entry != 0)
{
my_plat_entry = 0;
send = true;
}
>>>>>>>
entry.Text = "0";
if ((int) entry.Tag == 0)
{
if (my_gold_entry != 0)
{
my_gold_entry = 0;
send = true;
}
}
else if (my_plat_entry != 0)
{
my_plat_entry = 0;
send = true;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.