conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
void IDisposable.Dispose()
{
Close();
}
public void CreateStream(string stream, Guid id, bool isJson, byte[] metadata)
=======
public void CreateStream(string stream, bool isJson, byte[] metadata)
>>>>>>>
public void CreateStream(string stream, Guid id, bool isJson, byte[] metadata) |
<<<<<<<
CheckpointStrategy checkpointStrategy, long? checkpointUnhandledBytesThreshold, bool stopOnEof)
=======
IHandle<ProjectionSubscriptionMessage.CommittedEventReceived> eventHandler,
IHandle<ProjectionSubscriptionMessage.CheckpointSuggested> checkpointHandler,
IHandle<ProjectionSubscriptionMessage.ProgressChanged> progressHandler,
IHandle<ProjectionSubscriptionMessage.EofReached> eofHandler, CheckpointStrategy checkpointStrategy,
long? checkpointUnhandledBytesThreshold, int? checkpointProcessedEventsThreshold, bool stopOnEof)
>>>>>>>
CheckpointStrategy checkpointStrategy, long? checkpointUnhandledBytesThreshold, int? checkpointProcessedEventsThreshold, bool stopOnEof)
<<<<<<<
message, eventCheckpointTag, _eventFilter.GetCategory(message.PositionStreamId), _projectionCorrelationId,
_subscriptionId, _subscriptionMessageSequenceNumber++);
_publisher.Publish(convertedMessage);
=======
message, eventCheckpointTag, _eventFilter.GetCategory(message.PositionStreamId), _subscriptionId,
_subscriptionMessageSequenceNumber++);
_eventHandler.Handle(convertedMessage);
_eventsSinceLastCheckpointSuggested++;
if (_eventsSinceLastCheckpointSuggested >= _checkpointProcessedEventsThreshold)
SuggestCheckpoint(message);
>>>>>>>
message, eventCheckpointTag, _eventFilter.GetCategory(message.PositionStreamId), _projectionCorrelationId,
_subscriptionId, _subscriptionMessageSequenceNumber++);
_publisher.Publish(convertedMessage);
_eventsSinceLastCheckpointSuggested++;
if (_eventsSinceLastCheckpointSuggested >= _checkpointProcessedEventsThreshold)
SuggestCheckpoint(message);
<<<<<<<
_lastPassedOrCheckpointedEventPosition = message.Position.PreparePosition;
_publisher.Publish(
new ProjectionSubscriptionMessage.CheckpointSuggested(
_projectionCorrelationId, _subscriptionId, _positionTracker.LastTag, message.Progress,
_subscriptionMessageSequenceNumber++));
=======
SuggestCheckpoint(message);
>>>>>>>
SuggestCheckpoint(message); |
<<<<<<<
//TODO: revise it
var sourceDefintionRecorder = new SourceDefintionRecorder();
stateHandler.ConfigureSourceProcessingStrategy(sourceDefintionRecorder);
var sourceDefintion = sourceDefintionRecorder.Build();
var projection = CoreProjection.CreateAndPrepapre(message.Name, message.Version, message.ProjectionId, _publisher, stateHandler, message.Config, _readDispatcher,
_writeDispatcher, _logger);
=======
ProjectionSourceDefinition sourceDefinition;
var projection = CoreProjection.CreateAndPrepare(message.Name, message.ProjectionId, _publisher, stateHandler, message.Config, _readDispatcher,
_writeDispatcher, _logger, out sourceDefinition);
>>>>>>>
ProjectionSourceDefinition sourceDefinition;
var projection = CoreProjection.CreateAndPrepare(message.Name, message.Version, message.ProjectionId, _publisher, stateHandler, message.Config, _readDispatcher,
_writeDispatcher, _logger, out sourceDefinition);
<<<<<<<
//TODO: revise it
var sourceDefintionRecorder = new SourceDefintionRecorder();
message.SourceDefinition.ConfigureSourceProcessingStrategy(sourceDefintionRecorder);
var sourceDefintion = sourceDefintionRecorder.Build();
var projection = CoreProjection.CreatePrepapred(
message.Name, message.Version, message.ProjectionId, _publisher,
message.SourceDefinition, message.Config, _readDispatcher, _writeDispatcher, _logger);
=======
ProjectionSourceDefinition sourceDefinition;
var projection = CoreProjection.CreatePrepared(
message.Name, message.ProjectionId, _publisher, message.SourceDefintion, message.Config,
_readDispatcher, _writeDispatcher, _logger, out sourceDefinition);
>>>>>>>
ProjectionSourceDefinition sourceDefinition;
var projection = CoreProjection.CreatePrepared(
message.Name, message.Version, message.ProjectionId, _publisher, message.SourceDefinition, message.Config,
_readDispatcher, _writeDispatcher, _logger, out sourceDefinition); |
<<<<<<<
private Action _onStopped;
private Dictionary<string, List<IEnvelope>> _stateRequests;
private List<IEnvelope> _debugStateRequests;
=======
private Action _stopCompleted;
>>>>>>>
private Action _onStopped;
private List<IEnvelope> _debugStateRequests;
<<<<<<<
var partitionRequests = _stateRequests[message.Partition];
_stateRequests.Remove(message.Partition);
foreach (var request in partitionRequests)
request.ReplyWith(new ProjectionManagementMessage.ProjectionState(_name, message.State, message.Exception));
}
public void Handle(CoreProjectionManagementMessage.DebugState message)
{
var debugStateRequests = _debugStateRequests;
_debugStateRequests = null;
foreach (var request in debugStateRequests)
request.ReplyWith(new ProjectionManagementMessage.ProjectionDebugState(_name, message.Events));
=======
_getStateDispatcher.Handle(message);
>>>>>>>
_getStateDispatcher.Handle(message); |
<<<<<<<
IHandle<EventReaderSubscriptionMessage.PartitionDeleted>,
=======
IHandle<EventReaderSubscriptionMessage.PartitionMeasured>,
>>>>>>>
IHandle<EventReaderSubscriptionMessage.PartitionDeleted>,
IHandle<EventReaderSubscriptionMessage.PartitionMeasured>, |
<<<<<<<
[TestMethod]
public void OutputAppendTargetFrameworkToOutputPathTrue()
{
var writer = new ProjectWriter();
var xmlNode = writer.CreateXml(new Project
{
AppendTargetFrameworkToOutputPath = true,
FilePath = new System.IO.FileInfo("test.cs")
});
var appendTargetFrameworkToOutputPath = xmlNode.Element("PropertyGroup").Element("AppendTargetFrameworkToOutputPath");
Assert.IsNull(appendTargetFrameworkToOutputPath);
}
[TestMethod]
public void OutputAppendTargetFrameworkToOutputPathFalse()
{
var writer = new ProjectWriter();
var xmlNode = writer.CreateXml(new Project
{
AppendTargetFrameworkToOutputPath = false,
FilePath = new System.IO.FileInfo("test.cs")
});
var appendTargetFrameworkToOutputPath = xmlNode.Element("PropertyGroup").Element("AppendTargetFrameworkToOutputPath");
Assert.IsNotNull(appendTargetFrameworkToOutputPath);
Assert.AreEqual("false", appendTargetFrameworkToOutputPath.Value);
}
=======
[TestMethod]
public void PreventEmptyAssemblyReferences()
{
var project = new Project
{
AssemblyReferences = new List<AssemblyReference>
{
new AssemblyReference()
{
Include = "System"
}
},
FilePath = new System.IO.FileInfo("test.cs")
};
var writer = new ProjectWriter(_ => { }, _ => { });
var xmlNode = writer.CreateXml(project);
Assert.IsNull(xmlNode.Element("ItemGroup"));
}
>>>>>>>
[TestMethod]
public void PreventEmptyAssemblyReferences()
{
var project = new Project
{
AssemblyReferences = new List<AssemblyReference>
{
new AssemblyReference()
{
Include = "System"
}
},
FilePath = new System.IO.FileInfo("test.cs")
};
var writer = new ProjectWriter(_ => { }, _ => { });
var xmlNode = writer.CreateXml(project);
Assert.IsNull(xmlNode.Element("ItemGroup"));
}
[TestMethod]
public void OutputAppendTargetFrameworkToOutputPathTrue()
{
var writer = new ProjectWriter();
var xmlNode = writer.CreateXml(new Project
{
AppendTargetFrameworkToOutputPath = true,
FilePath = new System.IO.FileInfo("test.cs")
});
var appendTargetFrameworkToOutputPath = xmlNode.Element("PropertyGroup").Element("AppendTargetFrameworkToOutputPath");
Assert.IsNull(appendTargetFrameworkToOutputPath);
}
[TestMethod]
public void OutputAppendTargetFrameworkToOutputPathFalse()
{
var writer = new ProjectWriter();
var xmlNode = writer.CreateXml(new Project
{
AppendTargetFrameworkToOutputPath = false,
FilePath = new System.IO.FileInfo("test.cs")
});
var appendTargetFrameworkToOutputPath = xmlNode.Element("PropertyGroup").Element("AppendTargetFrameworkToOutputPath");
Assert.IsNotNull(appendTargetFrameworkToOutputPath);
Assert.AreEqual("false", appendTargetFrameworkToOutputPath.Value);
} |
<<<<<<<
yield return ProcessFile(projectFile, conversionOptions, preTransforms, postTransforms, progress);
=======
yield return ProcessFile(projectFile, null, preTransforms, postTransforms, progress);
>>>>>>>
yield return ProcessFile(projectFile, null, conversionOptions, preTransforms, postTransforms, progress); |
<<<<<<<
/// <remarks>Create a set with a single element, el.</remarks>
[return: NotNull]
=======
[NotNull]
>>>>>>>
[return: NotNull]
<<<<<<<
return intervals == null || intervals.Count == 0;
=======
/*
for (ListIterator iter = intervals.listIterator(); iter.hasNext();) {
Interval I = (Interval) iter.next();
if ( el<I.a ) {
break; // list is sorted and el is before this interval; not here
}
if ( el>=I.a && el<=I.b ) {
return true; // found in this interval
}
}
return false;
*/
return intervals == null || intervals.IsEmpty();
>>>>>>>
/*
for (ListIterator iter = intervals.listIterator(); iter.hasNext();) {
Interval I = (Interval) iter.next();
if ( el<I.a ) {
break; // list is sorted and el is before this interval; not here
}
if ( el>=I.a && el<=I.b ) {
return true; // found in this interval
}
}
return false;
*/
return intervals == null || intervals.Count == 0; |
<<<<<<<
=======
/*
* Copyright (c) 2012 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD-3-Clause license that
* can be found in the LICENSE.txt file in the project root.
*/
>>>>>>>
<<<<<<<
public ParserInterpreter(string grammarFileName, IVocabulary vocabulary, IEnumerable<string> ruleNames, ATN atn, ITokenStream input)
=======
public ParserInterpreter(string grammarFileName, [NotNull] IVocabulary vocabulary, ICollection<string> ruleNames, ATN atn, ITokenStream input)
>>>>>>>
public ParserInterpreter(string grammarFileName, [NotNull] IVocabulary vocabulary, IEnumerable<string> ruleNames, ATN atn, ITokenStream input) |
<<<<<<<
HashSet<PredictionContext> visited = new HashSet<PredictionContext>();
Stack<PredictionContext> workList = new Stack<PredictionContext>();
workList.Push(Context);
visited.Add(Context);
while (workList.Count > 0)
=======
IDictionary<PredictionContext, PredictionContext> visited = new IdentityHashMap<PredictionContext, PredictionContext>();
IDeque<PredictionContext> workList = new ArrayDeque<PredictionContext>();
workList.AddItem(Context);
visited.Put(Context, Context);
while (!workList.IsEmpty())
>>>>>>>
HashSet<PredictionContext> visited = new HashSet<PredictionContext>();
Stack<PredictionContext> workList = new Stack<PredictionContext>();
workList.Push(Context);
visited.Add(Context);
while (workList.Count > 0)
<<<<<<<
public virtual string ToString(IRecognizer recog, bool showAlt, bool showContext
)
=======
public virtual string ToString<_T0>(Recognizer<_T0> recog, bool showAlt, bool showContext)
>>>>>>>
public virtual string ToString(IRecognizer recog, bool showAlt, bool showContext) |
<<<<<<<
=======
/*
* Copyright (c) 2012 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD-3-Clause license that
* can be found in the LICENSE.txt file in the project root.
*/
>>>>>>>
<<<<<<<
[return: NotNull]
IIntSet AddAll(IIntSet set);
=======
[NotNull]
IIntSet AddAll([Nullable] IIntSet set);
>>>>>>>
[return: NotNull]
IIntSet AddAll([Nullable] IIntSet set);
<<<<<<<
[return: Nullable]
IIntSet And(IIntSet a);
=======
[Nullable]
IIntSet And([Nullable] IIntSet a);
>>>>>>>
[return: Nullable]
IIntSet And([Nullable] IIntSet a);
<<<<<<<
[return: Nullable]
IIntSet Complement(IIntSet elements);
=======
[Nullable]
IIntSet Complement([Nullable] IIntSet elements);
>>>>>>>
[return: Nullable]
IIntSet Complement([Nullable] IIntSet elements);
<<<<<<<
[return: Nullable]
IIntSet Or(IIntSet a);
=======
[Nullable]
IIntSet Or([Nullable] IIntSet a);
>>>>>>>
[return: Nullable]
IIntSet Or([Nullable] IIntSet a);
<<<<<<<
[return: Nullable]
IIntSet Subtract(IIntSet a);
=======
[Nullable]
IIntSet Subtract([Nullable] IIntSet a);
>>>>>>>
[return: Nullable]
IIntSet Subtract([Nullable] IIntSet a); |
<<<<<<<
=======
/*
* Copyright (c) 2012 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD-3-Clause license that
* can be found in the LICENSE.txt file in the project root.
*/
>>>>>>>
<<<<<<<
[return: Nullable]
protected internal virtual DFAState GetExistingTargetState(DFAState s, int t)
=======
[Nullable]
protected internal virtual DFAState GetExistingTargetState([NotNull] DFAState s, int t)
>>>>>>>
[return: Nullable]
protected internal virtual DFAState GetExistingTargetState([NotNull] DFAState s, int t)
<<<<<<<
[return: NotNull]
protected internal virtual Tuple<DFAState, ParserRuleContext> ComputeTargetState(DFA dfa, DFAState s, ParserRuleContext remainingGlobalContext, int t, bool useContext, PredictionContextCache contextCache)
=======
[NotNull]
protected internal virtual Tuple<DFAState, ParserRuleContext> ComputeTargetState([NotNull] DFA dfa, [NotNull] DFAState s, ParserRuleContext remainingGlobalContext, int t, bool useContext, PredictionContextCache contextCache)
>>>>>>>
[return: NotNull]
protected internal virtual Tuple<DFAState, ParserRuleContext> ComputeTargetState([NotNull] DFA dfa, [NotNull] DFAState s, ParserRuleContext remainingGlobalContext, int t, bool useContext, PredictionContextCache contextCache)
<<<<<<<
[return: NotNull]
protected internal virtual ATNConfigSet RemoveAllConfigsNotInRuleStopState(ATNConfigSet configs, PredictionContextCache contextCache)
=======
[NotNull]
protected internal virtual ATNConfigSet RemoveAllConfigsNotInRuleStopState([NotNull] ATNConfigSet configs, PredictionContextCache contextCache)
>>>>>>>
[return: NotNull]
protected internal virtual ATNConfigSet RemoveAllConfigsNotInRuleStopState([NotNull] ATNConfigSet configs, PredictionContextCache contextCache)
<<<<<<<
[return: NotNull]
protected internal virtual ATNConfigSet ApplyPrecedenceFilter(ATNConfigSet configs, ParserRuleContext globalContext, PredictionContextCache contextCache)
=======
[NotNull]
protected internal virtual ATNConfigSet ApplyPrecedenceFilter([NotNull] ATNConfigSet configs, ParserRuleContext globalContext, PredictionContextCache contextCache)
>>>>>>>
[return: NotNull]
protected internal virtual ATNConfigSet ApplyPrecedenceFilter([NotNull] ATNConfigSet configs, ParserRuleContext globalContext, PredictionContextCache contextCache)
<<<<<<<
/* In the future, this elimination step could be updated to also
* filter the prediction context for alternatives predicting alt>1
* (basically a graph subtraction algorithm).
*/
PredictionContext context;
if (statesFromAlt1.TryGetValue(config_1.State.stateNumber, out context) && context.Equals(config_1.Context))
=======
/* In the future, this elimination step could be updated to also
* filter the prediction context for alternatives predicting alt>1
* (basically a graph subtraction algorithm).
*/
PredictionContext context = statesFromAlt1[config_1.State.stateNumber];
if (context != null && context.Equals(config_1.Context))
>>>>>>>
/* In the future, this elimination step could be updated to also
* filter the prediction context for alternatives predicting alt>1
* (basically a graph subtraction algorithm).
*/
PredictionContext context;
if (statesFromAlt1.TryGetValue(config_1.State.stateNumber, out context) && context.Equals(config_1.Context))
<<<<<<<
[return: Nullable]
protected internal virtual ATNState GetReachableTarget(ATNConfig source, Transition trans, int ttype)
=======
[Nullable]
protected internal virtual ATNState GetReachableTarget([NotNull] ATNConfig source, [NotNull] Transition trans, int ttype)
>>>>>>>
[return: Nullable]
protected internal virtual ATNState GetReachableTarget([NotNull] ATNConfig source, [NotNull] Transition trans, int ttype)
<<<<<<<
[return: Nullable]
protected internal virtual ATNConfig GetEpsilonTarget(ATNConfig config, Transition t, bool collectPredicates, bool inContext, PredictionContextCache contextCache, bool treatEofAsEpsilon)
=======
[Nullable]
protected internal virtual ATNConfig GetEpsilonTarget([NotNull] ATNConfig config, [NotNull] Transition t, bool collectPredicates, bool inContext, PredictionContextCache contextCache, bool treatEofAsEpsilon)
>>>>>>>
[return: Nullable]
protected internal virtual ATNConfig GetEpsilonTarget([NotNull] ATNConfig config, [NotNull] Transition t, bool collectPredicates, bool inContext, PredictionContextCache contextCache, bool treatEofAsEpsilon)
<<<<<<<
[return: NotNull]
protected internal virtual ATNConfig ActionTransition(ATNConfig config, Antlr4.Runtime.Atn.ActionTransition t)
=======
[NotNull]
protected internal virtual ATNConfig ActionTransition([NotNull] ATNConfig config, [NotNull] Antlr4.Runtime.Atn.ActionTransition t)
>>>>>>>
[return: NotNull]
protected internal virtual ATNConfig ActionTransition([NotNull] ATNConfig config, [NotNull] Antlr4.Runtime.Atn.ActionTransition t)
<<<<<<<
[return: Nullable]
protected internal virtual ATNConfig PrecedenceTransition(ATNConfig config, PrecedencePredicateTransition pt, bool collectPredicates, bool inContext)
=======
[Nullable]
protected internal virtual ATNConfig PrecedenceTransition([NotNull] ATNConfig config, [NotNull] PrecedencePredicateTransition pt, bool collectPredicates, bool inContext)
>>>>>>>
[return: Nullable]
protected internal virtual ATNConfig PrecedenceTransition([NotNull] ATNConfig config, [NotNull] PrecedencePredicateTransition pt, bool collectPredicates, bool inContext)
<<<<<<<
[return: Nullable]
protected internal virtual ATNConfig PredTransition(ATNConfig config, PredicateTransition pt, bool collectPredicates, bool inContext)
=======
[Nullable]
protected internal virtual ATNConfig PredTransition([NotNull] ATNConfig config, [NotNull] PredicateTransition pt, bool collectPredicates, bool inContext)
>>>>>>>
[return: Nullable]
protected internal virtual ATNConfig PredTransition([NotNull] ATNConfig config, [NotNull] PredicateTransition pt, bool collectPredicates, bool inContext)
<<<<<<<
[return: NotNull]
protected internal virtual ATNConfig RuleTransition(ATNConfig config, Antlr4.Runtime.Atn.RuleTransition t, PredictionContextCache contextCache)
=======
[NotNull]
protected internal virtual ATNConfig RuleTransition([NotNull] ATNConfig config, [NotNull] Antlr4.Runtime.Atn.RuleTransition t, [Nullable] PredictionContextCache contextCache)
>>>>>>>
[return: NotNull]
protected internal virtual ATNConfig RuleTransition([NotNull] ATNConfig config, [NotNull] Antlr4.Runtime.Atn.RuleTransition t, [Nullable] PredictionContextCache contextCache)
<<<<<<<
#if !PORTABLE
public virtual void DumpDeadEndConfigs(NoViableAltException nvae)
=======
public virtual void DumpDeadEndConfigs([NotNull] NoViableAltException nvae)
>>>>>>>
#if !PORTABLE
public virtual void DumpDeadEndConfigs([NotNull] NoViableAltException nvae)
<<<<<<<
[return: NotNull]
protected internal virtual NoViableAltException NoViableAlt(ITokenStream input, ParserRuleContext outerContext, ATNConfigSet configs, int startIndex)
=======
[NotNull]
protected internal virtual NoViableAltException NoViableAlt([NotNull] ITokenStream input, [NotNull] ParserRuleContext outerContext, [NotNull] ATNConfigSet configs, int startIndex)
>>>>>>>
[return: NotNull]
protected internal virtual NoViableAltException NoViableAlt([NotNull] ITokenStream input, [NotNull] ParserRuleContext outerContext, [NotNull] ATNConfigSet configs, int startIndex)
<<<<<<<
[return: NotNull]
protected internal virtual DFAState AddDFAEdge(DFA dfa, DFAState fromState, int t, List<int> contextTransitions, ATNConfigSet toConfigs, PredictionContextCache contextCache)
=======
[NotNull]
protected internal virtual DFAState AddDFAEdge([NotNull] DFA dfa, [NotNull] DFAState fromState, int t, List<int> contextTransitions, [NotNull] ATNConfigSet toConfigs, PredictionContextCache contextCache)
>>>>>>>
[return: NotNull]
protected internal virtual DFAState AddDFAEdge([NotNull] DFA dfa, [NotNull] DFAState fromState, int t, List<int> contextTransitions, [NotNull] ATNConfigSet toConfigs, PredictionContextCache contextCache)
<<<<<<<
[return: NotNull]
protected internal virtual DFAState AddDFAContextState(DFA dfa, ATNConfigSet configs, int returnContext, PredictionContextCache contextCache)
=======
[NotNull]
protected internal virtual DFAState AddDFAContextState([NotNull] DFA dfa, [NotNull] ATNConfigSet configs, int returnContext, PredictionContextCache contextCache)
>>>>>>>
[return: NotNull]
protected internal virtual DFAState AddDFAContextState([NotNull] DFA dfa, [NotNull] ATNConfigSet configs, int returnContext, PredictionContextCache contextCache)
<<<<<<<
[return: NotNull]
protected internal virtual DFAState AddDFAState(DFA dfa, ATNConfigSet configs, PredictionContextCache contextCache)
=======
[NotNull]
protected internal virtual DFAState AddDFAState([NotNull] DFA dfa, [NotNull] ATNConfigSet configs, PredictionContextCache contextCache)
>>>>>>>
[return: NotNull]
protected internal virtual DFAState AddDFAState([NotNull] DFA dfa, [NotNull] ATNConfigSet configs, PredictionContextCache contextCache)
<<<<<<<
[return: NotNull]
protected internal virtual DFAState CreateDFAState(DFA dfa, ATNConfigSet configs)
=======
[NotNull]
protected internal virtual DFAState CreateDFAState([NotNull] DFA dfa, [NotNull] ATNConfigSet configs)
>>>>>>>
[return: NotNull]
protected internal virtual DFAState CreateDFAState([NotNull] DFA dfa, [NotNull] ATNConfigSet configs) |
<<<<<<<
=======
/*
* Copyright (c) 2012 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD-3-Clause license that
* can be found in the LICENSE.txt file in the project root.
*/
>>>>>>>
<<<<<<<
public NoViableAltException(IRecognizer recognizer, ITokenStream input, IToken startToken, IToken offendingToken, ATNConfigSet deadEndConfigs, ParserRuleContext ctx)
=======
public NoViableAltException([NotNull] Recognizer<IToken, object> recognizer, [NotNull] ITokenStream input, [NotNull] IToken startToken, [NotNull] IToken offendingToken, [Nullable] ATNConfigSet deadEndConfigs, [NotNull] ParserRuleContext ctx)
>>>>>>>
public NoViableAltException([NotNull] IRecognizer recognizer, [NotNull] ITokenStream input, [NotNull] IToken startToken, [NotNull] IToken offendingToken, [Nullable] ATNConfigSet deadEndConfigs, [NotNull] ParserRuleContext ctx) |
<<<<<<<
throw new NotSupportedException(string.Format("EdgeMap of type {0} is supported yet."
, m.GetType().FullName));
=======
throw new NotSupportedException(string.Format("EdgeMap of type %s is supported yet.", m.GetType().FullName));
>>>>>>>
throw new NotSupportedException(string.Format("EdgeMap of type {0} is supported yet.", m.GetType().FullName)); |
<<<<<<<
/// <summary>Who threw the exception?</summary>
private IRecognizer recognizer;
=======
/// <summary>
/// The
/// <see cref="Recognizer{Symbol, ATNInterpreter}">Recognizer<Symbol, ATNInterpreter>
/// </see>
/// where this exception originated.
/// </summary>
[Nullable]
private readonly Antlr4.Runtime.Recognizer<object, object> recognizer;
>>>>>>>
/// <summary>
/// The
/// <see cref="Recognizer{Symbol, ATNInterpreter}">Recognizer<Symbol, ATNInterpreter>
/// </see>
/// where this exception originated.
/// </summary>
[Nullable]
private readonly IRecognizer recognizer;
<<<<<<<
public virtual IRecognizer Recognizer
=======
/// <summary>
/// Gets the
/// <see cref="Recognizer{Symbol, ATNInterpreter}">Recognizer<Symbol, ATNInterpreter>
/// </see>
/// where this exception occurred.
/// <p/>
/// If the recognizer is not available, this method returns
/// <code>null</code>
/// .
/// </summary>
/// <returns>
/// The recognizer where this exception occurred, or
/// <code>null</code>
/// if
/// the recognizer is not available.
/// </returns>
public virtual Antlr4.Runtime.Recognizer<object, object> Recognizer
>>>>>>>
/// <summary>
/// Gets the
/// <see cref="Recognizer{Symbol, ATNInterpreter}">Recognizer<Symbol, ATNInterpreter>
/// </see>
/// where this exception occurred.
/// <p/>
/// If the recognizer is not available, this method returns
/// <code>null</code>
/// .
/// </summary>
/// <returns>
/// The recognizer where this exception occurred, or
/// <code>null</code>
/// if
/// the recognizer is not available.
/// </returns>
public virtual IRecognizer Recognizer |
<<<<<<<
programs[DefaultProgramName] = new List<TokenStreamRewriter.RewriteOperation>(ProgramInitSize
);
=======
programs.Put(DefaultProgramName, new List<TokenStreamRewriter.RewriteOperation>(ProgramInitSize));
>>>>>>>
programs[DefaultProgramName] = new List<TokenStreamRewriter.RewriteOperation>(ProgramInitSize);
<<<<<<<
IList<TokenStreamRewriter.RewriteOperation> @is = new List<TokenStreamRewriter.RewriteOperation
>(ProgramInitSize);
programs[name] = @is;
=======
IList<TokenStreamRewriter.RewriteOperation> @is = new List<TokenStreamRewriter.RewriteOperation>(ProgramInitSize);
programs.Put(name, @is);
>>>>>>>
IList<TokenStreamRewriter.RewriteOperation> @is = new List<TokenStreamRewriter.RewriteOperation>(ProgramInitSize);
programs[name] = @is;
<<<<<<<
rewrites[iop.instructionIndex] = null;
rop.text = iop.text.ToString() + (rop.text != null ? rop.text.ToString() : string.Empty
);
=======
rewrites.Set(iop.instructionIndex, null);
rop.text = iop.text.ToString() + (rop.text != null ? rop.text.ToString() : string.Empty);
>>>>>>>
rewrites[iop.instructionIndex] = null;
rop.text = iop.text.ToString() + (rop.text != null ? rop.text.ToString() : string.Empty);
<<<<<<<
protected internal virtual IList<T> GetKindOfOps<T>(IList<RewriteOperation> rewrites, int
before)
=======
protected internal virtual IList<T> GetKindOfOps<T, _T1>(IList<_T1> rewrites, int before)
where T : TokenStreamRewriter.RewriteOperation
where _T1 : TokenStreamRewriter.RewriteOperation
>>>>>>>
protected internal virtual IList<T> GetKindOfOps<T>(IList<RewriteOperation> rewrites, int before) |
<<<<<<<
=======
/*
* Copyright (c) 2012 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD-3-Clause license that
* can be found in the LICENSE.txt file in the project root.
*/
>>>>>>>
<<<<<<<
List<ATNConfig> sortedConfigs = new List<ATNConfig>(configs);
sortedConfigs.Sort(new _IComparer_475());
=======
IList<ATNConfig> sortedConfigs = new List<ATNConfig>(configs);
sortedConfigs.Sort(new _IComparer_451());
>>>>>>>
List<ATNConfig> sortedConfigs = new List<ATNConfig>(configs);
sortedConfigs.Sort(new _IComparer_451()); |
<<<<<<<
string message = string.Format(CultureInfo.CurrentCulture, "The specified lexer action type {0} is not valid.", action.GetActionType());
=======
string message = string.Format(CultureInfo.CurrentCulture, "The specified lexer action type %s is not valid.", action.ActionType);
>>>>>>>
string message = string.Format(CultureInfo.CurrentCulture, "The specified lexer action type {0} is not valid.", action.ActionType); |
<<<<<<<
=======
/*
* Copyright (c) 2012 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD-3-Clause license that
* can be found in the LICENSE.txt file in the project root.
*/
>>>>>>>
<<<<<<<
[return: NotNull]
public virtual IList<IParseTree> GetAll(string label)
=======
[NotNull]
public virtual IList<IParseTree> GetAll([NotNull] string label)
>>>>>>>
[return: NotNull]
public virtual IList<IParseTree> GetAll([NotNull] string label) |
<<<<<<<
/// <remarks>
/// Get the set of all alternatives represented by configurations in this
/// set.
/// </remarks>
[NotNull]
=======
>>>>>>>
[NotNull]
<<<<<<<
ATNConfig mergedConfig;
if (mergedConfigs.TryGetValue(configKey, out mergedConfig) && CanMerge(config, configKey, mergedConfig))
=======
ATNConfig mergedConfig = mergedConfigs[configKey];
if (mergedConfig != null && CanMerge(config, configKey, mergedConfig))
>>>>>>>
ATNConfig mergedConfig;
if (mergedConfigs.TryGetValue(configKey, out mergedConfig) && CanMerge(config, configKey, mergedConfig))
<<<<<<<
ATNConfig mergedConfig;
addKey = !mergedConfigs.TryGetValue(key, out mergedConfig);
=======
ATNConfig mergedConfig = mergedConfigs[key];
addKey = (mergedConfig == null);
>>>>>>>
ATNConfig mergedConfig;
addKey = !mergedConfigs.TryGetValue(key, out mergedConfig);
<<<<<<<
ATNConfig existing;
if (mergedConfigs.TryGetValue(key, out existing) && existing == config)
=======
if (mergedConfigs[key] == config)
>>>>>>>
ATNConfig existing;
if (mergedConfigs.TryGetValue(key, out existing) && existing == config) |
<<<<<<<
=======
/*
* [The "BSD license"]
* Copyright (c) 2012 Terence Parr
* Copyright (c) 2012 Sam Harwell
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
>>>>>>>
using System;
<<<<<<<
[return: NotNull]
=======
/// <since>4.5.1</since>
[NotNull]
>>>>>>>
/// <since>4.5.1</since>
[return: NotNull]
<<<<<<<
nodes.AddRange(Descendants(t.GetChild(i)));
=======
Sharpen.Collections.AddAll(nodes, GetDescendants(t.GetChild(i)));
>>>>>>>
nodes.AddRange(GetDescendants(t.GetChild(i))); |
<<<<<<<
* [The "BSD license"]
* Copyright (c) 2013 Terence Parr
* Copyright (c) 2013 Sam Harwell
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
=======
* [The "BSD license"]
* Copyright (c) 2012 Terence Parr
* Copyright (c) 2012 Sam Harwell
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
>>>>>>>
* [The "BSD license"]
* Copyright (c) 2012 Terence Parr
* Copyright (c) 2012 Sam Harwell
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System; |
<<<<<<<
[return: NotNull]
public virtual MultiMap<string, IParseTree> GetLabels()
=======
public virtual MultiMap<string, IParseTree> Labels
>>>>>>>
[NotNull]
public virtual MultiMap<string, IParseTree> Labels
<<<<<<<
[return: Nullable]
public virtual IParseTree GetMismatchedNode()
=======
public virtual IParseTree MismatchedNode
>>>>>>>
[Nullable]
public virtual IParseTree MismatchedNode
<<<<<<<
[return: NotNull]
public virtual ParseTreePattern GetPattern()
=======
public virtual ParseTreePattern Pattern
>>>>>>>
[NotNull]
public virtual ParseTreePattern Pattern
<<<<<<<
[return: NotNull]
public virtual IParseTree GetTree()
=======
public virtual IParseTree Tree
>>>>>>>
[NotNull]
public virtual IParseTree Tree
<<<<<<<
return string.Format("Match {0}; found {1} labels", Succeeded() ? "succeeded" : "failed", GetLabels().Count);
=======
return string.Format("Match %s; found %d labels", Succeeded ? "succeeded" : "failed", Labels.Count);
>>>>>>>
return string.Format("Match {0}; found {1} labels", Succeeded ? "succeeded" : "failed", Labels.Count); |
<<<<<<<
public override string[] ToStrings(IRecognizer recognizer, int currentState
)
=======
public override string[] ToStrings<_T0>(Recognizer<_T0> recognizer, int currentState)
>>>>>>>
public override string[] ToStrings(IRecognizer recognizer, int currentState)
<<<<<<<
public override string[] ToStrings(IRecognizer recognizer, PredictionContext
stop, int currentState)
=======
public override string[] ToStrings<_T0>(Recognizer<_T0> recognizer, PredictionContext stop, int currentState)
>>>>>>>
public override string[] ToStrings(IRecognizer recognizer, PredictionContext stop, int currentState) |
<<<<<<<
PredictionContextCache.IdentityCommutativePredictionContextOperands operands = new
PredictionContextCache.IdentityCommutativePredictionContextOperands(selfWorkList
.Pop(), otherWorkList.Pop());
if (!visited.Add(operands))
=======
PredictionContextCache.IdentityCommutativePredictionContextOperands operands = new PredictionContextCache.IdentityCommutativePredictionContextOperands(selfWorkList.Pop(), otherWorkList.Pop());
if (!visited.AddItem(operands))
>>>>>>>
PredictionContextCache.IdentityCommutativePredictionContextOperands operands = new PredictionContextCache.IdentityCommutativePredictionContextOperands(selfWorkList.Pop(), otherWorkList.Pop());
if (!visited.Add(operands)) |
<<<<<<<
public virtual int PredictATN(DFA dfa, ITokenStream input, ParserRuleContext outerContext
, bool useContext)
{
if (outerContext == null)
{
outerContext = ParserRuleContext.EmptyContext;
}
int alt = 0;
int m = input.Mark();
int index = input.Index;
try
{
SimulatorState state = ComputeStartState(dfa, outerContext, useContext);
if (state.s0.isAcceptState)
{
return ExecDFA(dfa, input, index, state);
}
else
{
alt = ExecATN(dfa, input, index, state);
}
}
catch (NoViableAltException)
{
throw;
}
finally
{
input.Seek(index);
input.Release(m);
}
return alt;
}
public virtual int ExecDFA(DFA dfa, ITokenStream input, int startIndex, SimulatorState
state)
=======
protected internal virtual int ExecDFA(DFA dfa, ITokenStream input, int startIndex
, SimulatorState state)
>>>>>>>
protected internal virtual int ExecDFA(DFA dfa, ITokenStream input, int startIndex
, SimulatorState state)
<<<<<<<
[return: NotNull]
public virtual SimulatorState ComputeStartState(DFA dfa, ParserRuleContext globalContext
, bool useContext)
=======
[NotNull]
protected internal virtual SimulatorState ComputeStartState(DFA dfa, ParserRuleContext
globalContext, bool useContext)
>>>>>>>
[return: NotNull]
protected internal virtual SimulatorState ComputeStartState(DFA dfa, ParserRuleContext
globalContext, bool useContext)
<<<<<<<
[return: Nullable]
public virtual ATNState GetReachableTarget(ATNConfig source, Transition trans, int
ttype)
=======
[Nullable]
protected internal virtual ATNState GetReachableTarget(ATNConfig source, Transition
trans, int ttype)
>>>>>>>
[return: Nullable]
protected internal virtual ATNState GetReachableTarget(ATNConfig source, Transition
trans, int ttype)
<<<<<<<
if (optimize_closure_busy && !closureBusy.Add(config))
{
continue;
}
=======
>>>>>>>
<<<<<<<
if (!optimize_closure_busy && !closureBusy.Add(config))
{
return;
}
// avoid infinite recursion
=======
>>>>>>>
<<<<<<<
if (optimize_closure_busy && c.Context.IsEmpty && !closureBusy.Add(c))
{
continue;
}
=======
>>>>>>>
<<<<<<<
if (optimize_closure_busy)
{
bool checkClosure = false;
switch (c.State.StateType)
{
case StateType.StarLoopEntry:
case StateType.BlockEnd:
case StateType.LoopEnd:
{
checkClosure = true;
break;
}
case StateType.PlusBlockStart:
{
checkClosure = true;
break;
}
case StateType.RuleStop:
{
checkClosure = c.Context.IsEmpty;
break;
}
default:
{
break;
}
}
if (checkClosure && !closureBusy.Add(c))
{
continue;
}
}
=======
>>>>>>>
<<<<<<<
[return: Nullable]
public virtual ATNConfig GetEpsilonTarget(ATNConfig config, Transition t, bool collectPredicates
, bool inContext, PredictionContextCache contextCache)
=======
[Nullable]
protected internal virtual ATNConfig GetEpsilonTarget(ATNConfig config, Transition
t, bool collectPredicates, bool inContext, PredictionContextCache contextCache
)
>>>>>>>
[return: Nullable]
protected internal virtual ATNConfig GetEpsilonTarget(ATNConfig config, Transition
t, bool collectPredicates, bool inContext, PredictionContextCache contextCache
)
<<<<<<<
[return: NotNull]
public virtual ATNConfig ActionTransition(ATNConfig config, Antlr4.Runtime.Atn.ActionTransition
=======
[NotNull]
protected internal virtual ATNConfig ActionTransition(ATNConfig config, Antlr4.Runtime.Atn.ActionTransition
>>>>>>>
[return: NotNull]
protected internal virtual ATNConfig ActionTransition(ATNConfig config, Antlr4.Runtime.Atn.ActionTransition
<<<<<<<
[return: Nullable]
public virtual ATNConfig PrecedenceTransition(ATNConfig config, PrecedencePredicateTransition
=======
[Nullable]
protected internal virtual ATNConfig PrecedenceTransition(ATNConfig config, PrecedencePredicateTransition
>>>>>>>
[return: Nullable]
protected internal virtual ATNConfig PrecedenceTransition(ATNConfig config, PrecedencePredicateTransition
<<<<<<<
[return: Nullable]
public virtual ATNConfig PredTransition(ATNConfig config, PredicateTransition pt,
bool collectPredicates, bool inContext)
=======
[Nullable]
protected internal virtual ATNConfig PredTransition(ATNConfig config, PredicateTransition
pt, bool collectPredicates, bool inContext)
>>>>>>>
[return: Nullable]
protected internal virtual ATNConfig PredTransition(ATNConfig config, PredicateTransition
pt, bool collectPredicates, bool inContext)
<<<<<<<
[return: NotNull]
public virtual ATNConfig RuleTransition(ATNConfig config, Antlr4.Runtime.Atn.RuleTransition
=======
[NotNull]
protected internal virtual ATNConfig RuleTransition(ATNConfig config, Antlr4.Runtime.Atn.RuleTransition
>>>>>>>
[return: NotNull]
protected internal virtual ATNConfig RuleTransition(ATNConfig config, Antlr4.Runtime.Atn.RuleTransition
<<<<<<<
[return: NotNull]
public virtual NoViableAltException NoViableAlt(ITokenStream input, ParserRuleContext
=======
[NotNull]
protected internal virtual NoViableAltException NoViableAlt(ITokenStream input, ParserRuleContext
>>>>>>>
[return: NotNull]
protected internal virtual NoViableAltException NoViableAlt(ITokenStream input, ParserRuleContext |
<<<<<<<
/// <see cref="ATNConfig.Context"/>
=======
/// <see cref="ATNConfig#context"/>
>>>>>>>
/// <see cref="ATNConfig.Context"/>
<<<<<<<
ATNConfig config = c.Transform(c.State, SemanticContext.None, false);
dup.AddItem(config);
=======
c = c.Transform(c.State, SemanticContext.None, false);
dup.Add(c);
>>>>>>>
ATNConfig config = c.Transform(c.State, SemanticContext.None, false);
dup.Add(c);
<<<<<<<
/// <see cref="ATNConfig.Alt"/>
=======
/// <see cref="ATNConfig.Alt()"/>
>>>>>>>
/// <see cref="ATNConfig.Alt"/> |
<<<<<<<
public abstract bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext outerContext)
where ATNInterpreter : ATNSimulator;
=======
public abstract bool Eval<_T0>(Recognizer<_T0> parser, RuleContext parserCallStack);
>>>>>>>
public abstract bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext parserCallStack)
where ATNInterpreter : ATNSimulator;
<<<<<<<
public virtual SemanticContext EvalPrecedence<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext outerContext)
where ATNInterpreter : ATNSimulator
=======
public virtual SemanticContext EvalPrecedence<_T0>(Recognizer<_T0> parser, RuleContext parserCallStack)
>>>>>>>
public virtual SemanticContext EvalPrecedence<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext parserCallStack)
where ATNInterpreter : ATNSimulator
<<<<<<<
public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext outerContext)
=======
public override bool Eval<_T0>(Recognizer<_T0> parser, RuleContext parserCallStack)
>>>>>>>
public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext parserCallStack)
<<<<<<<
public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext outerContext)
=======
public override bool Eval<_T0>(Recognizer<_T0> parser, RuleContext parserCallStack)
>>>>>>>
public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext parserCallStack)
<<<<<<<
public override SemanticContext EvalPrecedence<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext outerContext)
=======
public override SemanticContext EvalPrecedence<_T0>(Recognizer<_T0> parser, RuleContext parserCallStack)
>>>>>>>
public override SemanticContext EvalPrecedence<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext parserCallStack)
<<<<<<<
public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext outerContext)
=======
public override bool Eval<_T0>(Recognizer<_T0> parser, RuleContext parserCallStack)
>>>>>>>
public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext parserCallStack)
<<<<<<<
public override SemanticContext EvalPrecedence<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext outerContext)
=======
public override SemanticContext EvalPrecedence<_T0>(Recognizer<_T0> parser, RuleContext parserCallStack)
>>>>>>>
public override SemanticContext EvalPrecedence<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext parserCallStack)
<<<<<<<
public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext outerContext)
=======
public override bool Eval<_T0>(Recognizer<_T0> parser, RuleContext parserCallStack)
>>>>>>>
public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext parserCallStack)
<<<<<<<
public override SemanticContext EvalPrecedence<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext outerContext)
=======
public override SemanticContext EvalPrecedence<_T0>(Recognizer<_T0> parser, RuleContext parserCallStack)
>>>>>>>
public override SemanticContext EvalPrecedence<Symbol, ATNInterpreter>(Recognizer<Symbol, ATNInterpreter> parser, RuleContext parserCallStack) |
<<<<<<<
[return: NotNull]
public virtual IDictionary<string, int> GetTokenTypeMap()
=======
public virtual IDictionary<string, int> TokenTypeMap
>>>>>>>
[NotNull]
public virtual IDictionary<string, int> TokenTypeMap
<<<<<<<
result = Utils.ToMap(tokenNames);
result["EOF"] = TokenConstants.Eof;
tokenTypeMapCache.Put(tokenNames, result);
=======
IDictionary<string, int> result = tokenTypeMapCache.Get(tokenNames);
if (result == null)
{
result = Utils.ToMap(tokenNames);
result.Put("EOF", TokenConstants.Eof);
result = Sharpen.Collections.UnmodifiableMap(result);
tokenTypeMapCache.Put(tokenNames, result);
}
return result;
>>>>>>>
IDictionary<string, int> result = tokenTypeMapCache.Get(tokenNames);
if (result == null)
{
result = Utils.ToMap(tokenNames);
result["EOF"] = TokenConstants.Eof;
tokenTypeMapCache.Put(tokenNames, result);
}
return result;
<<<<<<<
[return: NotNull]
public virtual IDictionary<string, int> GetRuleIndexMap()
=======
public virtual IDictionary<string, int> RuleIndexMap
>>>>>>>
[NotNull]
public virtual IDictionary<string, int> RuleIndexMap
<<<<<<<
result = Utils.ToMap(ruleNames);
ruleIndexMapCache.Put(ruleNames, result);
=======
IDictionary<string, int> result = ruleIndexMapCache.Get(ruleNames);
if (result == null)
{
result = Sharpen.Collections.UnmodifiableMap(Utils.ToMap(ruleNames));
ruleIndexMapCache.Put(ruleNames, result);
}
return result;
>>>>>>>
IDictionary<string, int> result = ruleIndexMapCache.Get(ruleNames);
if (result == null)
{
result = Utils.ToMap(ruleNames);
ruleIndexMapCache.Put(ruleNames, result);
}
return result;
<<<<<<<
int ttype;
if (GetTokenTypeMap().TryGetValue(tokenName, out ttype))
=======
int ttype = TokenTypeMap.Get(tokenName);
if (ttype != null)
>>>>>>>
int ttype;
if (TokenTypeMap.TryGetValue(tokenName, out ttype))
<<<<<<<
[return: NotNull]
public virtual IList<IAntlrErrorListener<Symbol>> GetErrorListeners()
=======
public virtual IList<IAntlrErrorListener<Symbol>> ErrorListeners
>>>>>>>
[NotNull]
public virtual IList<IAntlrErrorListener<Symbol>> ErrorListeners |
<<<<<<<
=======
/*
* Copyright (c) 2012 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD-3-Clause license that
* can be found in the LICENSE.txt file in the project root.
*/
>>>>>>>
<<<<<<<
public static void RemoveAll<T>(IList<T> list, Predicate<T> predicate)
=======
public static void RemoveAll<T, _T1>([NotNull] IList<T> list, Predicate<_T1> predicate)
>>>>>>>
public static void RemoveAll<T>([NotNull] IList<T> list, Predicate<T> predicate)
<<<<<<<
[return: NotNull]
public static IntervalSet ToSet(BitSet bits)
=======
[NotNull]
public static IntervalSet ToSet([NotNull] BitSet bits)
>>>>>>>
[return: NotNull]
public static IntervalSet ToSet([NotNull] BitSet bits) |
<<<<<<<
[return: NotNull]
public virtual Lexer GetLexer()
=======
public virtual Lexer Lexer
>>>>>>>
[NotNull]
public virtual Lexer Lexer
<<<<<<<
[return: NotNull]
public virtual Parser GetParser()
=======
public virtual Parser Parser
>>>>>>>
[NotNull]
public virtual Parser Parser
<<<<<<<
labels.Map(tokenTagToken.GetTokenName(), tree);
if (tokenTagToken.GetLabel() != null)
=======
labels.Map(tokenTagToken.TokenName, tree);
if (tokenTagToken.Label != null)
>>>>>>>
labels.Map(tokenTagToken.TokenName, tree);
if (tokenTagToken.Label != null)
<<<<<<<
if (r1.GetRuleIndex() == r2.GetRuleIndex())
=======
ParseTreeMatch m = null;
if (r1.RuleContext.RuleIndex == r2.RuleContext.RuleIndex)
>>>>>>>
if (r1.RuleIndex == r2.RuleIndex)
<<<<<<<
TokenTagToken t = new TokenTagToken(tagChunk.GetTag(), ttype, tagChunk.GetLabel());
tokens.Add(t);
=======
TokenTagToken t = new TokenTagToken(tagChunk.Tag, ttype, tagChunk.Label);
tokens.AddItem(t);
>>>>>>>
TokenTagToken t = new TokenTagToken(tagChunk.Tag, ttype, tagChunk.Label);
tokens.Add(t);
<<<<<<<
tokens.Add(new RuleTagToken(tagChunk.GetTag(), ruleImaginaryTokenType, tagChunk.GetLabel()));
=======
tokens.AddItem(new RuleTagToken(tagChunk.Tag, ruleImaginaryTokenType, tagChunk.Label));
>>>>>>>
tokens.Add(new RuleTagToken(tagChunk.Tag, ruleImaginaryTokenType, tagChunk.Label)); |
<<<<<<<
protected internal ConcurrentDictionary<IParseTree, V> annotations = new ConcurrentDictionary<IParseTree
, V>();
=======
protected internal IDictionary<IParseTree, V> annotations = new IdentityHashMap<IParseTree, V>();
>>>>>>>
protected internal ConcurrentDictionary<IParseTree, V> annotations = new ConcurrentDictionary<IParseTree, V>(); |
<<<<<<<
=======
/*
* Copyright (c) 2012 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD-3-Clause license that
* can be found in the LICENSE.txt file in the project root.
*/
>>>>>>>
<<<<<<<
[return: NotNull]
public static Antlr4.Runtime.Atn.LexerActionExecutor Append(Antlr4.Runtime.Atn.LexerActionExecutor lexerActionExecutor, ILexerAction lexerAction)
=======
[NotNull]
public static Antlr4.Runtime.Atn.LexerActionExecutor Append([Nullable] Antlr4.Runtime.Atn.LexerActionExecutor lexerActionExecutor, [NotNull] ILexerAction lexerAction)
>>>>>>>
[return: NotNull]
public static Antlr4.Runtime.Atn.LexerActionExecutor Append([Nullable] Antlr4.Runtime.Atn.LexerActionExecutor lexerActionExecutor, [NotNull] ILexerAction lexerAction) |
<<<<<<<
=======
/*
* Copyright (c) 2012 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD-3-Clause license that
* can be found in the LICENSE.txt file in the project root.
*/
>>>>>>>
<<<<<<<
[return: NotNull]
public virtual string GetErrorHeader(RecognitionException e)
=======
[NotNull]
public virtual string GetErrorHeader([NotNull] RecognitionException e)
>>>>>>>
[return: NotNull]
public virtual string GetErrorHeader([NotNull] RecognitionException e) |
<<<<<<<
public UnbufferedCharStream(TextReader input) : this(input, 256)
=======
public UnbufferedCharStream(StreamReader input)
: this(input, 256)
>>>>>>>
public UnbufferedCharStream(TextReader input)
: this(input, 256)
<<<<<<<
public UnbufferedCharStream(TextReader input, int bufferSize) : this(bufferSize
)
=======
public UnbufferedCharStream(StreamReader input, int bufferSize)
: this(bufferSize)
>>>>>>>
public UnbufferedCharStream(TextReader input, int bufferSize)
: this(bufferSize) |
<<<<<<<
return string.Format(CultureInfo.CurrentCulture, "failed predicate: {{{0}}}?", predicate
);
=======
return string.Format(CultureInfo.CurrentCulture, "failed predicate: {%s}?", predicate);
>>>>>>>
return string.Format(CultureInfo.CurrentCulture, "failed predicate: {{{0}}}?", predicate); |
<<<<<<<
using System.Threading.Tasks;
=======
using Microsoft.AspNetCore.Builder;
>>>>>>>
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
<<<<<<<
using Microsoft.AspNetCore.Internal;
using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.Routing.Internal;
using Microsoft.AspNetCore.Routing.Matching;
using Microsoft.AspNetCore.Routing.Patterns;
=======
>>>>>>>
using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.Routing.Internal;
<<<<<<<
var endpointDataSource = new DefaultEndpointDataSource(new[]
{
new MatcherEndpoint((next) => (httpContext) =>
{
var response = httpContext.Response;
var payloadLength = _homePayload.Length;
response.StatusCode = 200;
response.ContentType = "text/plain";
response.ContentLength = payloadLength;
return response.Body.WriteAsync(_homePayload, 0, payloadLength);
},
RoutePatternFactory.Parse("/"),
0,
EndpointMetadataCollection.Empty,
"Home"),
new MatcherEndpoint((next) => (httpContext) =>
{
var response = httpContext.Response;
var payloadLength = _helloWorldPayload.Length;
response.StatusCode = 200;
response.ContentType = "text/plain";
response.ContentLength = payloadLength;
return response.Body.WriteAsync(_helloWorldPayload, 0, payloadLength);
},
RoutePatternFactory.Parse("/plaintext"),
0,
EndpointMetadataCollection.Empty,
"Plaintext"),
new MatcherEndpoint((next) => (httpContext) =>
{
var response = httpContext.Response;
response.StatusCode = 200;
response.ContentType = "text/plain";
return response.WriteAsync("WithConstraints");
},
RoutePatternFactory.Parse("/withconstraints/{id:endsWith(_001)}"),
0,
EndpointMetadataCollection.Empty,
"withconstraints"),
new MatcherEndpoint((next) => (httpContext) =>
{
var response = httpContext.Response;
response.StatusCode = 200;
response.ContentType = "text/plain";
return response.WriteAsync("withoptionalconstraints");
},
RoutePatternFactory.Parse("/withoptionalconstraints/{id:endsWith(_001)?}"),
0,
EndpointMetadataCollection.Empty,
"withoptionalconstraints"),
new MatcherEndpoint((next) => (httpContext) =>
{
using (var writer = new StreamWriter(httpContext.Response.Body, Encoding.UTF8, 1024, leaveOpen: true))
{
var graphWriter = httpContext.RequestServices.GetRequiredService<DfaGraphWriter>();
var dataSource = httpContext.RequestServices.GetRequiredService<CompositeEndpointDataSource>();
graphWriter.Write(dataSource, writer);
}
return Task.CompletedTask;
},
RoutePatternFactory.Parse("/graph"),
0,
new EndpointMetadataCollection(new HttpMethodMetadata(new[]{ "GET", })),
"DFA Graph"),
});
services.TryAddEnumerable(ServiceDescriptor.Singleton<EndpointDataSource>(endpointDataSource));
=======
>>>>>>> |
<<<<<<<
if (!joinedCheckContext.Equals(joinedCheckContext2))
{
return null;
}
}
else
{
PredictionContext check = contextCache.Join(joinedCheckContext, joinedCheckContext2);
if (!joinedCheckContext.Equals(check))
{
return null;
}
}
if (!exact && optimize_hidden_conflicted_configs)
{
for (int j = firstIndexCurrentState; j <= lastIndexCurrentStateMinAlt; j++)
{
ATNConfig checkConfig = configs[j];
if (checkConfig.SemanticContext != SemanticContext.None && !checkConfig.SemanticContext.Equals(config_1.SemanticContext))
{
continue;
}
if (joinedCheckContext != checkConfig.Context)
{
PredictionContext check = contextCache.Join(checkConfig.Context, config_1.Context);
if (!checkConfig.Context.Equals(check))
{
continue;
}
}
config_1.IsHidden = true;
}
=======
return null;
>>>>>>>
return null;
<<<<<<<
protected internal virtual int ResolveToMinAlt(DFAState D, BitSet conflictingAlts)
{
// kill dead alts so we don't chase them ever
// killAlts(conflictingAlts, D.configset);
D.prediction = conflictingAlts.NextSetBit(0);
return D.prediction;
}
[return: NotNull]
=======
[NotNull]
>>>>>>>
[return: NotNull]
<<<<<<<
string[] tokensNames = parser.TokenNames;
if (t >= tokensNames.Length)
{
#if !PORTABLE
System.Console.Error.WriteLine(t + " ttype out of range: " + Arrays.ToString(tokensNames));
System.Console.Error.WriteLine(((CommonTokenStream)((ITokenStream)parser.InputStream)).GetTokens());
#endif
}
else
{
return tokensNames[t] + "<" + t + ">";
}
=======
return displayName;
>>>>>>>
return displayName;
<<<<<<<
DFAState proposed = CreateDFAState(configs);
DFAState existing;
if (dfa.states.TryGetValue(proposed, out existing))
=======
DFAState proposed = CreateDFAState(dfa, configs);
DFAState existing = dfa.states.Get(proposed);
if (existing != null)
>>>>>>>
DFAState proposed = CreateDFAState(dfa, configs);
DFAState existing;
if (dfa.states.TryGetValue(proposed, out existing))
<<<<<<<
configs.ConflictingAlts = IsConflicted(configs, contextCache);
if (optimize_hidden_conflicted_configs && configs.ConflictingAlts != null)
{
int size = configs.Count;
configs.StripHiddenConfigs();
if (enableDfa && configs.Count < size)
{
DFAState proposed = CreateDFAState(configs);
DFAState existing;
if (dfa.states.TryGetValue(proposed, out existing))
{
return existing;
}
}
}
=======
configs.ConflictInformation = IsConflicted(configs, contextCache);
>>>>>>>
configs.ConflictInformation = IsConflicted(configs, contextCache);
<<<<<<<
[return: NotNull]
protected internal virtual DFAState CreateDFAState(ATNConfigSet configs)
=======
[NotNull]
protected internal virtual DFAState CreateDFAState(DFA dfa, ATNConfigSet configs)
>>>>>>>
[return: NotNull]
protected internal virtual DFAState CreateDFAState(DFA dfa, ATNConfigSet configs) |
<<<<<<<
=======
/*
* Copyright (c) 2012 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD-3-Clause license that
* can be found in the LICENSE.txt file in the project root.
*/
>>>>>>>
<<<<<<<
[return: NotNull]
string GetText(Interval interval);
=======
[NotNull]
string GetText([NotNull] Interval interval);
>>>>>>>
[return: NotNull]
string GetText([NotNull] Interval interval);
<<<<<<<
[return: NotNull]
string GetText(RuleContext ctx);
=======
[NotNull]
string GetText([NotNull] RuleContext ctx);
>>>>>>>
[return: NotNull]
string GetText([NotNull] RuleContext ctx); |
<<<<<<<
=======
/*
* Copyright (c) 2012 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD-3-Clause license that
* can be found in the LICENSE.txt file in the project root.
*/
>>>>>>>
<<<<<<<
[return: NotNull]
public static IList<ITree> GetAncestors(ITree t)
=======
[NotNull]
public static IList<ITree> GetAncestors([NotNull] ITree t)
>>>>>>>
[return: NotNull]
public static IList<ITree> GetAncestors([NotNull] ITree t)
<<<<<<<
[return: Nullable]
public static ParserRuleContext GetRootOfSubtreeEnclosingRegion(IParseTree t, int startTokenIndex, int stopTokenIndex)
=======
[Nullable]
public static ParserRuleContext GetRootOfSubtreeEnclosingRegion([NotNull] IParseTree t, int startTokenIndex, int stopTokenIndex)
>>>>>>>
[return: Nullable]
public static ParserRuleContext GetRootOfSubtreeEnclosingRegion([NotNull] IParseTree t, int startTokenIndex, int stopTokenIndex) |
<<<<<<<
/// <see cref="PredictionMode"/>
/// <code>(</code>
/// <see cref="Atn.PredictionMode.Sll"/>
/// <code>)</code>
=======
/// <see cref="PredictionMode(PredictionMode)">setPredictionMode</see>
/// <c>(</c>
/// <see cref="PredictionMode.Sll"/>
/// <c>)</c>
>>>>>>>
/// <see cref="PredictionMode"/>
/// <c>(</c>
/// <see cref="Atn.PredictionMode.Sll"/>
/// <c>)</c> |
<<<<<<<
=======
/*
* Copyright (c) 2012 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD-3-Clause license that
* can be found in the LICENSE.txt file in the project root.
*/
>>>>>>>
<<<<<<<
[return: NotNull]
public static Antlr4.Runtime.Misc.IntervalSet Subtract(Antlr4.Runtime.Misc.IntervalSet left, Antlr4.Runtime.Misc.IntervalSet right)
=======
[NotNull]
public static Antlr4.Runtime.Misc.IntervalSet Subtract([Nullable] Antlr4.Runtime.Misc.IntervalSet left, [Nullable] Antlr4.Runtime.Misc.IntervalSet right)
>>>>>>>
[return: NotNull]
public static Antlr4.Runtime.Misc.IntervalSet Subtract([Nullable] Antlr4.Runtime.Misc.IntervalSet left, [Nullable] Antlr4.Runtime.Misc.IntervalSet right)
<<<<<<<
}
}
return false;
*/
return intervals == null || intervals.Count == 0;
=======
}
}
return false;
*/
return intervals == null || intervals.IsEmpty();
>>>>>>>
}
}
return false;
*/
return intervals == null || intervals.Count == 0;
<<<<<<<
[return: NotNull]
protected internal virtual string ElementName(IVocabulary vocabulary, int a)
=======
[NotNull]
protected internal virtual string ElementName([NotNull] IVocabulary vocabulary, int a)
>>>>>>>
[return: NotNull]
protected internal virtual string ElementName([NotNull] IVocabulary vocabulary, int a) |
<<<<<<<
ATNConfig config = c.Transform(c.GetState(), SemanticContext.None);
dup.AddItem(config);
=======
c = c.Transform(c.State, SemanticContext.None);
dup.AddItem(c);
>>>>>>>
ATNConfig config = c.Transform(c.State, SemanticContext.None);
dup.AddItem(config);
<<<<<<<
[return: NotNull]
public static ICollection<BitSet> GetConflictingAltSubsets(ATNConfigSet configs)
=======
[NotNull]
public static ICollection<BitSet> GetConflictingAltSubsets(IEnumerable<ATNConfig>
configs)
>>>>>>>
[return: NotNull]
public static ICollection<BitSet> GetConflictingAltSubsets(IEnumerable<ATNConfig>
configs)
<<<<<<<
[return: NotNull]
public static IDictionary<ATNState, BitSet> GetStateToAltMap(ATNConfigSet configs
)
=======
[NotNull]
public static IDictionary<ATNState, BitSet> GetStateToAltMap(IEnumerable<ATNConfig
> configs)
>>>>>>>
[return: NotNull]
public static IDictionary<ATNState, BitSet> GetStateToAltMap(IEnumerable<ATNConfig
> configs) |
<<<<<<<
=======
/*
* Copyright (c) 2012 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD-3-Clause license that
* can be found in the LICENSE.txt file in the project root.
*/
>>>>>>>
<<<<<<<
// combine objects
// convert to strings...we're in process of toString'ing
// whole token buffer so no lazy eval issue with any templates
iop.text = CatOpText(iop.text, prevIop.text);
// delete redundant prior insert
rewrites[prevIop.instructionIndex] = null;
=======
if (typeof(TokenStreamRewriter.InsertAfterOp).IsInstanceOfType(prevIop))
{
iop.text = CatOpText(prevIop.text, iop.text);
rewrites.Set(prevIop.instructionIndex, null);
}
else
{
if (typeof(TokenStreamRewriter.InsertBeforeOp).IsInstanceOfType(prevIop))
{
// combine objects
// convert to strings...we're in process of toString'ing
// whole token buffer so no lazy eval issue with any templates
iop.text = CatOpText(iop.text, prevIop.text);
// delete redundant prior insert
rewrites.Set(prevIop.instructionIndex, null);
}
}
>>>>>>>
if (typeof(TokenStreamRewriter.InsertAfterOp).IsInstanceOfType(prevIop))
{
iop.text = CatOpText(prevIop.text, iop.text);
rewrites.Set(prevIop.instructionIndex, null);
}
else
{
if (typeof(TokenStreamRewriter.InsertBeforeOp).IsInstanceOfType(prevIop))
{
// combine objects
// convert to strings...we're in process of toString'ing
// whole token buffer so no lazy eval issue with any templates
iop.text = CatOpText(iop.text, prevIop.text);
// delete redundant prior insert
rewrites[prevIop.instructionIndex] = null;
}
} |
<<<<<<<
[return: NotNull]
protected internal virtual Tuple<DFAState, ParserRuleContext> ComputeTargetState(
DFA dfa, DFAState s, ParserRuleContext remainingGlobalContext, int t, bool useContext
, PredictionContextCache contextCache)
=======
[NotNull]
protected internal virtual Tuple<DFAState, ParserRuleContext> ComputeTargetState(DFA dfa, DFAState s, ParserRuleContext remainingGlobalContext, int t, bool useContext, PredictionContextCache contextCache)
>>>>>>>
[return: NotNull]
protected internal virtual Tuple<DFAState, ParserRuleContext> ComputeTargetState(DFA dfa, DFAState s, ParserRuleContext remainingGlobalContext, int t, bool useContext, PredictionContextCache contextCache)
<<<<<<<
closureConfigs[i] = closureConfigs[i].AppendContext(nextContextElement, contextCache
);
=======
closureConfigs.Set(i, closureConfigs[i].AppendContext(nextContextElement, contextCache));
>>>>>>>
closureConfigs[i] = closureConfigs[i].AppendContext(nextContextElement, contextCache);
<<<<<<<
[return: NotNull]
protected internal virtual ATNConfigSet RemoveAllConfigsNotInRuleStopState(ATNConfigSet
configs, PredictionContextCache contextCache)
=======
[NotNull]
protected internal virtual ATNConfigSet RemoveAllConfigsNotInRuleStopState(ATNConfigSet configs, PredictionContextCache contextCache)
>>>>>>>
[return: NotNull]
protected internal virtual ATNConfigSet RemoveAllConfigsNotInRuleStopState(ATNConfigSet configs, PredictionContextCache contextCache)
<<<<<<<
[return: NotNull]
protected internal virtual SimulatorState ComputeStartState(DFA dfa, ParserRuleContext
globalContext, bool useContext)
=======
[NotNull]
protected internal virtual SimulatorState ComputeStartState(DFA dfa, ParserRuleContext globalContext, bool useContext)
>>>>>>>
[return: NotNull]
protected internal virtual SimulatorState ComputeStartState(DFA dfa, ParserRuleContext globalContext, bool useContext)
<<<<<<<
[return: Nullable]
protected internal virtual ATNState GetReachableTarget(ATNConfig source, Transition
trans, int ttype)
=======
[Nullable]
protected internal virtual ATNState GetReachableTarget(ATNConfig source, Transition trans, int ttype)
>>>>>>>
[return: Nullable]
protected internal virtual ATNState GetReachableTarget(ATNConfig source, Transition trans, int ttype)
<<<<<<<
return pairs.ToArray();
=======
return Sharpen.Collections.ToArray(pairs, new DFAState.PredPrediction[pairs.Count]);
>>>>>>>
return pairs.ToArray();
<<<<<<<
[return: Nullable]
protected internal virtual ATNConfig GetEpsilonTarget(ATNConfig config, Transition
t, bool collectPredicates, bool inContext, PredictionContextCache contextCache
)
=======
[Nullable]
protected internal virtual ATNConfig GetEpsilonTarget(ATNConfig config, Transition t, bool collectPredicates, bool inContext, PredictionContextCache contextCache)
>>>>>>>
[return: Nullable]
protected internal virtual ATNConfig GetEpsilonTarget(ATNConfig config, Transition t, bool collectPredicates, bool inContext, PredictionContextCache contextCache)
<<<<<<<
[return: NotNull]
protected internal virtual ATNConfig ActionTransition(ATNConfig config, Antlr4.Runtime.Atn.ActionTransition
t)
=======
[NotNull]
protected internal virtual ATNConfig ActionTransition(ATNConfig config, Antlr4.Runtime.Atn.ActionTransition t)
>>>>>>>
[return: NotNull]
protected internal virtual ATNConfig ActionTransition(ATNConfig config, Antlr4.Runtime.Atn.ActionTransition t)
<<<<<<<
[return: Nullable]
protected internal virtual ATNConfig PrecedenceTransition(ATNConfig config, PrecedencePredicateTransition
pt, bool collectPredicates, bool inContext)
=======
[Nullable]
protected internal virtual ATNConfig PrecedenceTransition(ATNConfig config, PrecedencePredicateTransition pt, bool collectPredicates, bool inContext)
>>>>>>>
[return: Nullable]
protected internal virtual ATNConfig PrecedenceTransition(ATNConfig config, PrecedencePredicateTransition pt, bool collectPredicates, bool inContext)
<<<<<<<
[return: Nullable]
protected internal virtual ATNConfig PredTransition(ATNConfig config, PredicateTransition
pt, bool collectPredicates, bool inContext)
=======
[Nullable]
protected internal virtual ATNConfig PredTransition(ATNConfig config, PredicateTransition pt, bool collectPredicates, bool inContext)
>>>>>>>
[return: Nullable]
protected internal virtual ATNConfig PredTransition(ATNConfig config, PredicateTransition pt, bool collectPredicates, bool inContext)
<<<<<<<
[return: NotNull]
protected internal virtual ATNConfig RuleTransition(ATNConfig config, Antlr4.Runtime.Atn.RuleTransition
t, PredictionContextCache contextCache)
=======
[NotNull]
protected internal virtual ATNConfig RuleTransition(ATNConfig config, Antlr4.Runtime.Atn.RuleTransition t, PredictionContextCache contextCache)
>>>>>>>
[return: NotNull]
protected internal virtual ATNConfig RuleTransition(ATNConfig config, Antlr4.Runtime.Atn.RuleTransition t, PredictionContextCache contextCache)
<<<<<<<
ATNConfig checkConfig = configs[j];
if (checkConfig.SemanticContext != SemanticContext.None && !checkConfig.SemanticContext
.Equals(config.SemanticContext))
=======
ATNConfig checkConfig = configs[j_1];
if (checkConfig.SemanticContext != SemanticContext.None && !checkConfig.SemanticContext.Equals(config.SemanticContext))
>>>>>>>
ATNConfig checkConfig = configs[j];
if (checkConfig.SemanticContext != SemanticContext.None && !checkConfig.SemanticContext.Equals(config.SemanticContext))
<<<<<<<
#if !PORTABLE
System.Console.Error.WriteLine(t + " ttype out of range: " + Arrays.ToString(tokensNames
));
System.Console.Error.WriteLine(((CommonTokenStream)((ITokenStream)parser.InputStream
)).GetTokens());
#endif
=======
System.Console.Error.WriteLine(t + " ttype out of range: " + Arrays.ToString(tokensNames));
System.Console.Error.WriteLine(((CommonTokenStream)((ITokenStream)parser.InputStream)).GetTokens());
>>>>>>>
#if !PORTABLE
System.Console.Error.WriteLine(t + " ttype out of range: " + Arrays.ToString(tokensNames));
System.Console.Error.WriteLine(((CommonTokenStream)((ITokenStream)parser.InputStream)).GetTokens());
#endif
<<<<<<<
[return: NotNull]
protected internal virtual NoViableAltException NoViableAlt(ITokenStream input, ParserRuleContext
outerContext, ATNConfigSet configs, int startIndex)
=======
[NotNull]
protected internal virtual NoViableAltException NoViableAlt(ITokenStream input, ParserRuleContext outerContext, ATNConfigSet configs, int startIndex)
>>>>>>>
[return: NotNull]
protected internal virtual NoViableAltException NoViableAlt(ITokenStream input, ParserRuleContext outerContext, ATNConfigSet configs, int startIndex)
<<<<<<<
[return: NotNull]
protected internal virtual DFAState AddDFAContextState(DFA dfa, ATNConfigSet configs
, int returnContext, PredictionContextCache contextCache)
=======
[NotNull]
protected internal virtual DFAState AddDFAContextState(DFA dfa, ATNConfigSet configs, int returnContext, PredictionContextCache contextCache)
>>>>>>>
[return: NotNull]
protected internal virtual DFAState AddDFAContextState(DFA dfa, ATNConfigSet configs, int returnContext, PredictionContextCache contextCache)
<<<<<<<
[return: NotNull]
protected internal virtual DFAState AddDFAState(DFA dfa, ATNConfigSet configs, PredictionContextCache
contextCache)
=======
[NotNull]
protected internal virtual DFAState AddDFAState(DFA dfa, ATNConfigSet configs, PredictionContextCache contextCache)
>>>>>>>
[return: NotNull]
protected internal virtual DFAState AddDFAState(DFA dfa, ATNConfigSet configs, PredictionContextCache contextCache) |
<<<<<<<
=======
/*
* Copyright (c) 2012 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD-3-Clause license that
* can be found in the LICENSE.txt file in the project root.
*/
>>>>>>>
<<<<<<<
[return: NotNull]
string GetText(Interval interval);
=======
[NotNull]
string GetText([NotNull] Interval interval);
>>>>>>>
[return: NotNull]
string GetText([NotNull] Interval interval); |
<<<<<<<
#if !PORTABLE
=======
matchedEOF = false;
>>>>>>>
matchedEOF = false;
#if !PORTABLE
<<<<<<<
/// Given an AmbiguityInfo object that contains information about an
/// ambiguous decision event, return the list of ambiguous parse trees.
/// </summary>
/// <remarks>
/// Given an AmbiguityInfo object that contains information about an
/// ambiguous decision event, return the list of ambiguous parse trees.
/// An ambiguity occurs when a specific token sequence can be recognized
/// in more than one way by the grammar. These ambiguities are detected only
/// at decision points.
/// The list of trees includes the actual interpretation (that for
/// the minimum alternative number) and all ambiguous alternatives.
/// This method reuses the same physical input token stream used to
/// detect the ambiguity by the original parser in the first place.
/// This method resets/seeks within but does not alter originalParser.
/// The input position is restored upon exit from this method.
/// Parsers using a
/// <see cref="UnbufferedTokenStream"/>
/// may not be able to
/// perform the necessary save index() / seek(saved_index) operation.
/// The trees are rooted at the node whose start..stop token indices
/// include the start and stop indices of this ambiguity event. That is,
/// the trees returns will always include the complete ambiguous subphrase
/// identified by the ambiguity event.
/// Be aware that this method does NOT notify error or parse listeners as
/// it would trigger duplicate or otherwise unwanted events.
/// This uses a temporary ParserATNSimulator and a ParserInterpreter
/// so we don't mess up any statistics, event lists, etc...
/// The parse tree constructed while identifying/making ambiguityInfo is
/// not affected by this method as it creates a new parser interp to
/// get the ambiguous interpretations.
/// Nodes in the returned ambig trees are independent of the original parse
/// tree (constructed while identifying/creating ambiguityInfo).
/// </remarks>
/// <param name="originalParser">
/// The parser used to create ambiguityInfo; it
/// is not modified by this routine and can be either
/// a generated or interpreted parser. It's token
/// stream *is* reset/seek()'d.
/// </param>
/// <param name="ambiguityInfo">
/// The information about an ambiguous decision event
/// for which you want ambiguous parse trees.
/// </param>
/// <exception cref="RecognitionException">
/// Throws upon syntax error while matching
/// ambig input.
/// </exception>
/// <since>4.5</since>
public static IList<ParserRuleContext> GetAmbiguousParseTrees(Parser originalParser, AmbiguityInfo ambiguityInfo, int startRuleIndex)
{
IList<ParserRuleContext> trees = new List<ParserRuleContext>();
int saveTokenInputPosition = ((ITokenStream)originalParser.InputStream).Index;
try
{
// Create a new parser interpreter to parse the ambiguous subphrase
ParserInterpreter parser;
if (originalParser is ParserInterpreter)
{
parser = new ParserInterpreter((ParserInterpreter)originalParser);
}
else
{
parser = new ParserInterpreter(originalParser.GrammarFileName, originalParser.Vocabulary, Arrays.AsList(originalParser.RuleNames), originalParser.Atn, ((ITokenStream)originalParser.InputStream));
}
// Make sure that we don't get any error messages from using this temporary parser
parser.RemoveErrorListeners();
parser.RemoveParseListeners();
parser.Interpreter.PredictionMode = PredictionMode.LlExactAmbigDetection;
// get ambig trees
int alt = ambiguityInfo.AmbiguousAlternatives.NextSetBit(0);
while (alt >= 0)
{
// re-parse input for all ambiguous alternatives
// (don't have to do first as it's been parsed, but do again for simplicity
// using this temp parser.)
parser.Reset();
((ITokenStream)parser.InputStream).Seek(ambiguityInfo.startIndex);
parser.overrideDecision = ambiguityInfo.decision;
parser.overrideDecisionInputIndex = ambiguityInfo.startIndex;
parser.overrideDecisionAlt = alt;
ParserRuleContext t = parser.Parse(startRuleIndex);
ParserRuleContext ambigSubTree = Trees.GetRootOfSubtreeEnclosingRegion(t, ambiguityInfo.startIndex, ambiguityInfo.stopIndex);
trees.Add(ambigSubTree);
alt = ambiguityInfo.AmbiguousAlternatives.NextSetBit(alt + 1);
}
}
finally
{
((ITokenStream)originalParser.InputStream).Seek(saveTokenInputPosition);
}
return trees;
}
/// <summary>
=======
>>>>>>> |
<<<<<<<
public DFASerializer(DFA dfa, IRecognizer parser)
: this(dfa, parser != null ? parser.TokenNames : null, parser != null ? parser.RuleNames : null, parser != null ? parser.Atn : null)
=======
public DFASerializer(DFA dfa, Recognizer<object, object> parser)
: this(dfa, parser != null ? parser.Vocabulary : Vocabulary.EmptyVocabulary, parser != null ? parser.RuleNames : null, parser != null ? parser.Atn : null)
>>>>>>>
public DFASerializer(DFA dfa, IRecognizer parser)
: this(dfa, parser != null ? parser.Vocabulary : Vocabulary.EmptyVocabulary, parser != null ? parser.RuleNames : null, parser != null ? parser.Atn : null)
<<<<<<<
List<DFAState> states = new List<DFAState>(dfa.states.Values);
states.Sort(new _IComparer_85());
=======
IList<DFAState> states = new List<DFAState>(dfa.states.Values);
states.Sort(new _IComparer_103());
>>>>>>>
List<DFAState> states = new List<DFAState>(dfa.states.Values);
states.Sort(new _IComparer_103()); |
<<<<<<<
[return: NotNull]
public virtual ParseTreePatternMatcher GetMatcher()
=======
public virtual ParseTreePatternMatcher Matcher
>>>>>>>
[NotNull]
public virtual ParseTreePatternMatcher Matcher
<<<<<<<
[return: NotNull]
public virtual string GetPattern()
=======
public virtual string Pattern
>>>>>>>
[NotNull]
public virtual string Pattern
<<<<<<<
[return: NotNull]
public virtual IParseTree GetPatternTree()
=======
public virtual IParseTree PatternTree
>>>>>>>
[NotNull]
public virtual IParseTree PatternTree |
<<<<<<<
PredictionContextCache.PredictionContextAndInt operands = new PredictionContextCache.PredictionContextAndInt
(context, invokingState);
PredictionContext result;
if (!childContexts.TryGetValue(operands, out result))
=======
PredictionContextCache.PredictionContextAndInt operands = new PredictionContextCache.PredictionContextAndInt(context, invokingState);
PredictionContext result = childContexts.Get(operands);
if (result == null)
>>>>>>>
PredictionContextCache.PredictionContextAndInt operands = new PredictionContextCache.PredictionContextAndInt(context, invokingState);
PredictionContext result;
if (!childContexts.TryGetValue(operands, out result))
<<<<<<<
PredictionContextCache.IdentityCommutativePredictionContextOperands operands = new
PredictionContextCache.IdentityCommutativePredictionContextOperands(x, y);
PredictionContext result;
if (joinContexts.TryGetValue(operands, out result))
=======
PredictionContextCache.IdentityCommutativePredictionContextOperands operands = new PredictionContextCache.IdentityCommutativePredictionContextOperands(x, y);
PredictionContext result = joinContexts.Get(operands);
if (result != null)
>>>>>>>
PredictionContextCache.IdentityCommutativePredictionContextOperands operands = new PredictionContextCache.IdentityCommutativePredictionContextOperands(x, y);
PredictionContext result;
if (joinContexts.TryGetValue(operands, out result)) |
<<<<<<<
=======
/*
* Copyright (c) 2012 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD-3-Clause license that
* can be found in the LICENSE.txt file in the project root.
*/
>>>>>>>
<<<<<<<
[return: NotNull]
private static string FormatMessage(string predicate, string message)
=======
[NotNull]
private static string FormatMessage([Nullable] string predicate, [Nullable] string message)
>>>>>>>
[return: NotNull]
private static string FormatMessage([Nullable] string predicate, [Nullable] string message) |
<<<<<<<
=======
/*
* Copyright (c) 2012 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD-3-Clause license that
* can be found in the LICENSE.txt file in the project root.
*/
>>>>>>>
<<<<<<<
result[literalName] = i;
}
string symbolicName = vocabulary.GetSymbolicName(i);
if (symbolicName != null)
{
result[symbolicName] = i;
=======
IDictionary<string, int> result = tokenTypeMapCache[vocabulary];
if (result == null)
{
result = new Dictionary<string, int>();
for (int i = 0; i <= Atn.maxTokenType; i++)
{
string literalName = vocabulary.GetLiteralName(i);
if (literalName != null)
{
result[literalName] = i;
}
string symbolicName = vocabulary.GetSymbolicName(i);
if (symbolicName != null)
{
result[symbolicName] = i;
}
}
result["EOF"] = TokenConstants.Eof;
result = Antlr4.Runtime.Sharpen.Collections.UnmodifiableMap(result);
tokenTypeMapCache[vocabulary] = result;
}
return result;
>>>>>>>
result[literalName] = i;
}
string symbolicName = vocabulary.GetSymbolicName(i);
if (symbolicName != null)
{
result[symbolicName] = i; |
<<<<<<<
=======
/* Copyright (c) 2012 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD-3-Clause license that
* can be found in the LICENSE.txt file in the project root.
*/
>>>>>>>
<<<<<<<
[return: NotNull]
IEdgeMap<T> Put(int key, T value);
=======
[NotNull]
IEdgeMap<T> Put(int key, [Nullable] T value);
>>>>>>>
[return: NotNull]
IEdgeMap<T> Put(int key, [Nullable] T value); |
<<<<<<<
int ruleIndex = p.GetRuleIndex();
string ruleName = ruleIndex >= 0 && ruleIndex < ruleNames.Count ? ruleNames[ruleIndex] : ruleIndex.ToString();
=======
int ruleIndex = p.RuleIndex;
string ruleName = ruleIndex >= 0 && ruleIndex < ruleNames.Count ? ruleNames[ruleIndex] : Sharpen.Extensions.ToString(ruleIndex);
>>>>>>>
int ruleIndex = p.RuleIndex;
string ruleName = ruleIndex >= 0 && ruleIndex < ruleNames.Count ? ruleNames[ruleIndex] : ruleIndex.ToString(); |
<<<<<<<
public DefaultProjectSnapshotWorker(
ForegroundDispatcher foregroundDispatcher,
ProjectExtensibilityConfigurationFactory configurationFactory,
TagHelperResolver tagHelperResolver)
=======
public DefaultProjectSnapshotWorker(ForegroundDispatcher foregroundDispatcher)
>>>>>>>
public DefaultProjectSnapshotWorker(ForegroundDispatcher foregroundDispatcher, TagHelperResolver tagHelperResolver)
<<<<<<<
if (configurationFactory == null)
{
throw new ArgumentNullException(nameof(configurationFactory));
}
if (tagHelperResolver == null)
{
throw new ArgumentNullException(nameof(tagHelperResolver));
}
=======
>>>>>>>
if (tagHelperResolver == null)
{
throw new ArgumentNullException(nameof(tagHelperResolver));
}
<<<<<<<
_configurationFactory = configurationFactory;
_tagHelperResolver = tagHelperResolver;
=======
>>>>>>>
_tagHelperResolver = tagHelperResolver;
<<<<<<<
var configuration = await _configurationFactory.GetConfigurationAsync(update.UnderlyingProject);
update.Configuration = configuration;
var result = await _tagHelperResolver.GetTagHelpersAsync(update.UnderlyingProject, CancellationToken.None);
update.TagHelpers = result.Descriptors;
=======
return Task.CompletedTask;
>>>>>>>
var snapshot = new DefaultProjectSnapshot(update.HostProject, update.WorkspaceProject, update.Version);
var result = await _tagHelperResolver.GetTagHelpersAsync(snapshot, CancellationToken.None);
update.TagHelpers = result.Descriptors; |
<<<<<<<
=======
/*
* Copyright (c) 2012 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD-3-Clause license that
* can be found in the LICENSE.txt file in the project root.
*/
>>>>>>>
<<<<<<<
[return: Nullable]
protected internal virtual IToken SingleTokenDeletion(Parser recognizer)
=======
[Nullable]
protected internal virtual IToken SingleTokenDeletion([NotNull] Parser recognizer)
>>>>>>>
[return: Nullable]
protected internal virtual IToken SingleTokenDeletion([NotNull] Parser recognizer)
<<<<<<<
[return: NotNull]
protected internal virtual IToken GetMissingSymbol(Parser recognizer)
=======
[NotNull]
protected internal virtual IToken GetMissingSymbol([NotNull] Parser recognizer)
>>>>>>>
[return: NotNull]
protected internal virtual IToken GetMissingSymbol([NotNull] Parser recognizer)
<<<<<<<
[return: NotNull]
protected internal virtual IntervalSet GetExpectedTokens(Parser recognizer)
=======
[NotNull]
protected internal virtual IntervalSet GetExpectedTokens([NotNull] Parser recognizer)
>>>>>>>
[return: NotNull]
protected internal virtual IntervalSet GetExpectedTokens([NotNull] Parser recognizer)
<<<<<<<
[return: NotNull]
protected internal virtual string EscapeWSAndQuote(string s)
=======
[NotNull]
protected internal virtual string EscapeWSAndQuote([NotNull] string s)
>>>>>>>
[return: NotNull]
protected internal virtual string EscapeWSAndQuote([NotNull] string s)
<<<<<<<
/* Compute the error recovery set for the current rule. During
* rule invocation, the parser pushes the set of tokens that can
* follow that rule reference on the stack; this amounts to
* computing FIRST of what follows the rule reference in the
* enclosing rule. See LinearApproximator.FIRST().
* This local follow set only includes tokens
* from within the rule; i.e., the FIRST computation done by
* ANTLR stops at the end of a rule.
*
* EXAMPLE
*
* When you find a "no viable alt exception", the input is not
* consistent with any of the alternatives for rule r. The best
* thing to do is to consume tokens until you see something that
* can legally follow a call to r *or* any rule that called r.
* You don't want the exact set of viable next tokens because the
* input might just be missing a token--you might consume the
* rest of the input looking for one of the missing tokens.
*
* Consider grammar:
*
* a : '[' b ']'
* | '(' b ')'
* ;
* b : c '^' INT ;
* c : ID
* | INT
* ;
*
* At each rule invocation, the set of tokens that could follow
* that rule is pushed on a stack. Here are the various
* context-sensitive follow sets:
*
* FOLLOW(b1_in_a) = FIRST(']') = ']'
* FOLLOW(b2_in_a) = FIRST(')') = ')'
* FOLLOW(c_in_b) = FIRST('^') = '^'
*
* Upon erroneous input "[]", the call chain is
*
* a -> b -> c
*
* and, hence, the follow context stack is:
*
* depth follow set start of rule execution
* 0 <EOF> a (from main())
* 1 ']' b
* 2 '^' c
*
* Notice that ')' is not included, because b would have to have
* been called from a different context in rule a for ')' to be
* included.
*
* For error recovery, we cannot consider FOLLOW(c)
* (context-sensitive or otherwise). We need the combined set of
* all context-sensitive FOLLOW sets--the set of all tokens that
* could follow any reference in the call chain. We need to
* resync to one of those tokens. Note that FOLLOW(c)='^' and if
* we resync'd to that token, we'd consume until EOF. We need to
* sync to context-sensitive FOLLOWs for a, b, and c: {']','^'}.
* In this case, for input "[]", LA(1) is ']' and in the set, so we would
* not consume anything. After printing an error, rule c would
* return normally. Rule b would not find the required '^' though.
* At this point, it gets a mismatched token error and throws an
* exception (since LA(1) is not in the viable following token
* set). The rule exception handler tries to recover, but finds
* the same recovery set and doesn't consume anything. Rule b
* exits normally returning to rule a. Now it finds the ']' (and
* with the successful match exits errorRecovery mode).
*
* So, you can see that the parser walks up the call chain looking
* for the token that was a member of the recovery set.
*
* Errors are not generated in errorRecovery mode.
*
* ANTLR's error recovery mechanism is based upon original ideas:
*
* "Algorithms + Data Structures = Programs" by Niklaus Wirth
*
* and
*
* "A note on error recovery in recursive descent parsers":
* http://portal.acm.org/citation.cfm?id=947902.947905
*
* Later, Josef Grosch had some good ideas:
*
* "Efficient and Comfortable Error Recovery in Recursive Descent
* Parsers":
* ftp://www.cocolab.com/products/cocktail/doca4.ps/ell.ps.zip
*
* Like Grosch I implement context-sensitive FOLLOW sets that are combined
* at run-time upon error to avoid overhead during parsing.
*/
[return: NotNull]
protected internal virtual IntervalSet GetErrorRecoverySet(Parser recognizer)
=======
/* Compute the error recovery set for the current rule. During
* rule invocation, the parser pushes the set of tokens that can
* follow that rule reference on the stack; this amounts to
* computing FIRST of what follows the rule reference in the
* enclosing rule. See LinearApproximator.FIRST().
* This local follow set only includes tokens
* from within the rule; i.e., the FIRST computation done by
* ANTLR stops at the end of a rule.
*
* EXAMPLE
*
* When you find a "no viable alt exception", the input is not
* consistent with any of the alternatives for rule r. The best
* thing to do is to consume tokens until you see something that
* can legally follow a call to r *or* any rule that called r.
* You don't want the exact set of viable next tokens because the
* input might just be missing a token--you might consume the
* rest of the input looking for one of the missing tokens.
*
* Consider grammar:
*
* a : '[' b ']'
* | '(' b ')'
* ;
* b : c '^' INT ;
* c : ID
* | INT
* ;
*
* At each rule invocation, the set of tokens that could follow
* that rule is pushed on a stack. Here are the various
* context-sensitive follow sets:
*
* FOLLOW(b1_in_a) = FIRST(']') = ']'
* FOLLOW(b2_in_a) = FIRST(')') = ')'
* FOLLOW(c_in_b) = FIRST('^') = '^'
*
* Upon erroneous input "[]", the call chain is
*
* a -> b -> c
*
* and, hence, the follow context stack is:
*
* depth follow set start of rule execution
* 0 <EOF> a (from main())
* 1 ']' b
* 2 '^' c
*
* Notice that ')' is not included, because b would have to have
* been called from a different context in rule a for ')' to be
* included.
*
* For error recovery, we cannot consider FOLLOW(c)
* (context-sensitive or otherwise). We need the combined set of
* all context-sensitive FOLLOW sets--the set of all tokens that
* could follow any reference in the call chain. We need to
* resync to one of those tokens. Note that FOLLOW(c)='^' and if
* we resync'd to that token, we'd consume until EOF. We need to
* sync to context-sensitive FOLLOWs for a, b, and c: {']','^'}.
* In this case, for input "[]", LA(1) is ']' and in the set, so we would
* not consume anything. After printing an error, rule c would
* return normally. Rule b would not find the required '^' though.
* At this point, it gets a mismatched token error and throws an
* exception (since LA(1) is not in the viable following token
* set). The rule exception handler tries to recover, but finds
* the same recovery set and doesn't consume anything. Rule b
* exits normally returning to rule a. Now it finds the ']' (and
* with the successful match exits errorRecovery mode).
*
* So, you can see that the parser walks up the call chain looking
* for the token that was a member of the recovery set.
*
* Errors are not generated in errorRecovery mode.
*
* ANTLR's error recovery mechanism is based upon original ideas:
*
* "Algorithms + Data Structures = Programs" by Niklaus Wirth
*
* and
*
* "A note on error recovery in recursive descent parsers":
* http://portal.acm.org/citation.cfm?id=947902.947905
*
* Later, Josef Grosch had some good ideas:
*
* "Efficient and Comfortable Error Recovery in Recursive Descent
* Parsers":
* ftp://www.cocolab.com/products/cocktail/doca4.ps/ell.ps.zip
*
* Like Grosch I implement context-sensitive FOLLOW sets that are combined
* at run-time upon error to avoid overhead during parsing.
*/
[NotNull]
protected internal virtual IntervalSet GetErrorRecoverySet([NotNull] Parser recognizer)
>>>>>>>
/* Compute the error recovery set for the current rule. During
* rule invocation, the parser pushes the set of tokens that can
* follow that rule reference on the stack; this amounts to
* computing FIRST of what follows the rule reference in the
* enclosing rule. See LinearApproximator.FIRST().
* This local follow set only includes tokens
* from within the rule; i.e., the FIRST computation done by
* ANTLR stops at the end of a rule.
*
* EXAMPLE
*
* When you find a "no viable alt exception", the input is not
* consistent with any of the alternatives for rule r. The best
* thing to do is to consume tokens until you see something that
* can legally follow a call to r *or* any rule that called r.
* You don't want the exact set of viable next tokens because the
* input might just be missing a token--you might consume the
* rest of the input looking for one of the missing tokens.
*
* Consider grammar:
*
* a : '[' b ']'
* | '(' b ')'
* ;
* b : c '^' INT ;
* c : ID
* | INT
* ;
*
* At each rule invocation, the set of tokens that could follow
* that rule is pushed on a stack. Here are the various
* context-sensitive follow sets:
*
* FOLLOW(b1_in_a) = FIRST(']') = ']'
* FOLLOW(b2_in_a) = FIRST(')') = ')'
* FOLLOW(c_in_b) = FIRST('^') = '^'
*
* Upon erroneous input "[]", the call chain is
*
* a -> b -> c
*
* and, hence, the follow context stack is:
*
* depth follow set start of rule execution
* 0 <EOF> a (from main())
* 1 ']' b
* 2 '^' c
*
* Notice that ')' is not included, because b would have to have
* been called from a different context in rule a for ')' to be
* included.
*
* For error recovery, we cannot consider FOLLOW(c)
* (context-sensitive or otherwise). We need the combined set of
* all context-sensitive FOLLOW sets--the set of all tokens that
* could follow any reference in the call chain. We need to
* resync to one of those tokens. Note that FOLLOW(c)='^' and if
* we resync'd to that token, we'd consume until EOF. We need to
* sync to context-sensitive FOLLOWs for a, b, and c: {']','^'}.
* In this case, for input "[]", LA(1) is ']' and in the set, so we would
* not consume anything. After printing an error, rule c would
* return normally. Rule b would not find the required '^' though.
* At this point, it gets a mismatched token error and throws an
* exception (since LA(1) is not in the viable following token
* set). The rule exception handler tries to recover, but finds
* the same recovery set and doesn't consume anything. Rule b
* exits normally returning to rule a. Now it finds the ']' (and
* with the successful match exits errorRecovery mode).
*
* So, you can see that the parser walks up the call chain looking
* for the token that was a member of the recovery set.
*
* Errors are not generated in errorRecovery mode.
*
* ANTLR's error recovery mechanism is based upon original ideas:
*
* "Algorithms + Data Structures = Programs" by Niklaus Wirth
*
* and
*
* "A note on error recovery in recursive descent parsers":
* http://portal.acm.org/citation.cfm?id=947902.947905
*
* Later, Josef Grosch had some good ideas:
*
* "Efficient and Comfortable Error Recovery in Recursive Descent
* Parsers":
* ftp://www.cocolab.com/products/cocktail/doca4.ps/ell.ps.zip
*
* Like Grosch I implement context-sensitive FOLLOW sets that are combined
* at run-time upon error to avoid overhead during parsing.
*/
[return: NotNull]
protected internal virtual IntervalSet GetErrorRecoverySet([NotNull] Parser recognizer) |
<<<<<<<
public readonly IDictionary<string, TokensStartState> modeNameToStartState = new
Dictionary<string, TokensStartState>();
=======
public readonly IDictionary<string, TokensStartState> modeNameToStartState = new LinkedHashMap<string, TokensStartState>();
>>>>>>>
public readonly IDictionary<string, TokensStartState> modeNameToStartState = new Dictionary<string, TokensStartState>();
<<<<<<<
[return: NotNull]
public virtual IntervalSet GetExpectedTokens(int stateNumber, RuleContext context
)
=======
[NotNull]
public virtual IntervalSet GetExpectedTokens(int stateNumber, RuleContext context)
>>>>>>>
[return: NotNull]
public virtual IntervalSet GetExpectedTokens(int stateNumber, RuleContext context) |
<<<<<<<
using Antlr4.Runtime.Sharpen;
=======
>>>>>>>
<<<<<<<
/// <see cref="ParseTreeMatch.MismatchedNode"/>
=======
/// <see cref="ParseTreeMatch#mismatchedNode"/>
>>>>>>>
/// <see cref="ParseTreeMatch.MismatchedNode"/> |
<<<<<<<
public static readonly int SerializedVersion = 5;
=======
public static readonly int SerializedVersion;
static ATNSimulator()
{
SerializedVersion = 3;
}
public static readonly UUID SerializedUuid;
static ATNSimulator()
{
SerializedUuid = UUID.FromString("E4178468-DF95-44D0-AD87-F22A5D5FB6D3");
}
>>>>>>>
public static readonly int SerializedVersion = 3;
public static readonly UUID SerializedUuid = UUID.FromString("E4178468-DF95-44D0-AD87-F22A5D5FB6D3");
<<<<<<<
string reason = string.Format("Could not deserialize ATN with version {0} (expected {1})."
=======
string reason = string.Format(CultureInfo.CurrentCulture, "Could not deserialize ATN with version %d (expected %d)."
>>>>>>>
string reason = string.Format(CultureInfo.CurrentCulture, "Could not deserialize ATN with version {0} (expected {1})."
<<<<<<<
sets.Add(set);
for (int j = 1; j <= nintervals; j++)
=======
sets.AddItem(set);
bool containsEof = ToInt(data[p++]) != 0;
if (containsEof)
{
set.Add(-1);
}
for (int j = 0; j < nintervals; j++)
>>>>>>>
sets.Add(set);
bool containsEof = ToInt(data[p++]) != 0;
if (containsEof)
{
set.Add(-1);
}
for (int j = 0; j < nintervals; j++)
<<<<<<<
string message = string.Format("The specified state type {0} is not valid.", type);
=======
string message = string.Format(CultureInfo.CurrentCulture, "The specified state type %d is not valid."
, type);
>>>>>>>
string message = string.Format(CultureInfo.CurrentCulture, "The specified state type {0} is not valid."
, type); |
<<<<<<<
=======
/*
* Copyright (c) 2012 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD-3-Clause license that
* can be found in the LICENSE.txt file in the project root.
*/
>>>>>>>
<<<<<<<
[return: Nullable]
protected internal virtual DFAState GetExistingTargetState(DFAState s, int t)
=======
[Nullable]
protected internal virtual DFAState GetExistingTargetState([NotNull] DFAState s, int t)
>>>>>>>
[return: Nullable]
protected internal virtual DFAState GetExistingTargetState([NotNull] DFAState s, int t)
<<<<<<<
[return: NotNull]
protected internal virtual DFAState ComputeTargetState(ICharStream input, DFAState s, int t)
=======
[NotNull]
protected internal virtual DFAState ComputeTargetState([NotNull] ICharStream input, [NotNull] DFAState s, int t)
>>>>>>>
[return: NotNull]
protected internal virtual DFAState ComputeTargetState([NotNull] ICharStream input, [NotNull] DFAState s, int t)
<<<<<<<
[return: NotNull]
protected internal virtual ATNConfigSet ComputeStartState(ICharStream input, ATNState p)
=======
[NotNull]
protected internal virtual ATNConfigSet ComputeStartState([NotNull] ICharStream input, [NotNull] ATNState p)
>>>>>>>
[return: NotNull]
protected internal virtual ATNConfigSet ComputeStartState([NotNull] ICharStream input, [NotNull] ATNState p)
<<<<<<<
[return: Nullable]
protected internal virtual ATNConfig GetEpsilonTarget(ICharStream input, ATNConfig config, Transition t, ATNConfigSet configs, bool speculative, bool treatEofAsEpsilon)
=======
[Nullable]
protected internal virtual ATNConfig GetEpsilonTarget([NotNull] ICharStream input, [NotNull] ATNConfig config, [NotNull] Transition t, [NotNull] ATNConfigSet configs, bool speculative, bool treatEofAsEpsilon)
>>>>>>>
[return: Nullable]
protected internal virtual ATNConfig GetEpsilonTarget([NotNull] ICharStream input, [NotNull] ATNConfig config, [NotNull] Transition t, [NotNull] ATNConfigSet configs, bool speculative, bool treatEofAsEpsilon)
<<<<<<<
[return: NotNull]
public virtual string GetText(ICharStream input)
=======
[NotNull]
public virtual string GetText([NotNull] ICharStream input)
>>>>>>>
[return: NotNull]
public virtual string GetText([NotNull] ICharStream input) |
<<<<<<<
=======
static ATNSimulator()
{
Error = new DFAState(new EmptyEdgeMap<DFAState>(0, -1), new EmptyEdgeMap<DFAState>(0, -1), new ATNConfigSet());
Error.stateNumber = int.MaxValue;
}
>>>>>>> |
<<<<<<<
public ParserInterpreter(string grammarFileName, IEnumerable<string> tokenNames, IEnumerable<string> ruleNames, ATN atn, ITokenStream input)
=======
[System.ObsoleteAttribute(@"Use ParserInterpreter(string, IVocabulary, System.Collections.Generic.ICollection{E}, Antlr4.Runtime.Atn.ATN, ITokenStream) instead.")]
public ParserInterpreter(string grammarFileName, ICollection<string> tokenNames, ICollection<string> ruleNames, ATN atn, ITokenStream input)
: this(grammarFileName, Antlr4.Runtime.Vocabulary.FromTokenNames(Sharpen.Collections.ToArray(tokenNames, new string[tokenNames.Count])), ruleNames, atn, input)
{
}
public ParserInterpreter(string grammarFileName, IVocabulary vocabulary, ICollection<string> ruleNames, ATN atn, ITokenStream input)
>>>>>>>
[System.ObsoleteAttribute(@"Use ParserInterpreter(string, IVocabulary, System.Collections.Generic.ICollection{E}, Antlr4.Runtime.Atn.ATN, ITokenStream) instead.")]
public ParserInterpreter(string grammarFileName, IEnumerable<string> tokenNames, IEnumerable<string> ruleNames, ATN atn, ITokenStream input)
: this(grammarFileName, Antlr4.Runtime.Vocabulary.FromTokenNames(Sharpen.Collections.ToArray(tokenNames, new string[tokenNames.Count])), ruleNames, atn, input)
{
}
public ParserInterpreter(string grammarFileName, IVocabulary vocabulary, ICollection<string> ruleNames, ATN atn, ITokenStream input)
<<<<<<<
this.tokenNames = tokenNames.ToArray();
this.ruleNames = ruleNames.ToArray();
=======
this.tokenNames = new string[atn.maxTokenType];
for (int i = 0; i < tokenNames.Length; i++)
{
tokenNames[i] = vocabulary.GetDisplayName(i);
}
this.ruleNames = Sharpen.Collections.ToArray(ruleNames, new string[ruleNames.Count]);
this.vocabulary = vocabulary;
>>>>>>>
this.tokenNames = new string[atn.maxTokenType];
for (int i = 0; i < tokenNames.Length; i++)
{
tokenNames[i] = vocabulary.GetDisplayName(i);
}
this.ruleNames = ruleNames.ToArray();
this.vocabulary = vocabulary; |
<<<<<<<
[return: NotNull]
public virtual BitArray GetRepresentedAlternatives()
=======
[NotNull]
public virtual BitSet GetRepresentedAlternatives()
>>>>>>>
[return: NotNull]
public virtual BitSet GetRepresentedAlternatives() |
<<<<<<<
ATNConfigSet closure = s.configs;
DFAState target = null;
target = s.GetTarget(t);
if (target == Error)
{
break;
}
#if !PORTABLE
if (debug && target != null)
=======
DFAState target = GetExistingTargetState(s, t);
if (target == null)
>>>>>>>
DFAState target = GetExistingTargetState(s, t);
if (target == null)
<<<<<<<
[return: Nullable]
public virtual ATNState GetReachableTarget(Transition trans, int t)
=======
[Nullable]
protected internal virtual ATNState GetReachableTarget(Transition trans, int t)
>>>>>>>
[return: Nullable]
protected internal virtual ATNState GetReachableTarget(Transition trans, int t)
<<<<<<<
[return: Nullable]
public virtual ATNConfig GetEpsilonTarget(ICharStream input, ATNConfig config, Transition
t, ATNConfigSet configs, bool speculative)
=======
[Nullable]
protected internal virtual ATNConfig GetEpsilonTarget(ICharStream input, ATNConfig
config, Transition t, ATNConfigSet configs, bool speculative)
>>>>>>>
[return: Nullable]
protected internal virtual ATNConfig GetEpsilonTarget(ICharStream input, ATNConfig
config, Transition t, ATNConfigSet configs, bool speculative) |
<<<<<<<
using Antlr4.Runtime.Sharpen;
=======
>>>>>>>
<<<<<<<
/// <seealso cref="Antlr4.Runtime.Atn.ATNDeserializationOptions.GenerateRuleBypassTransitions()">Antlr4.Runtime.Atn.ATNDeserializationOptions.GenerateRuleBypassTransitions()</seealso>
private static readonly IDictionary<string, ATN> bypassAltsAtnCache = new Dictionary<string, ATN>();
=======
/// <seealso cref="Antlr4.Runtime.Atn.ATNDeserializationOptions.GenerateRuleBypassTransitions()"/>
private static readonly IDictionary<string, ATN> bypassAltsAtnCache = new WeakHashMap<string, ATN>();
>>>>>>>
/// <seealso cref="Antlr4.Runtime.Atn.ATNDeserializationOptions.GenerateRuleBypassTransitions()"/>
private static readonly IDictionary<string, ATN> bypassAltsAtnCache = new Dictionary<string, ATN>();
<<<<<<<
/// <seealso cref="ErrorHandler"/>
=======
/// <seealso cref="ErrorHandler()"/>
/// <seealso cref="ErrorHandler(IAntlrErrorStrategy)"/>
>>>>>>>
/// <seealso cref="ErrorHandler"/>
<<<<<<<
/// <seealso cref="BuildParseTree"/>
=======
/// <seealso cref="BuildParseTree()"/>
/// <seealso cref="BuildParseTree(bool)"/>
>>>>>>>
/// <seealso cref="BuildParseTree"/>
<<<<<<<
/// <see cref="Trace"/>
=======
/// <see cref="Trace(bool)"/>
>>>>>>>
/// <see cref="Trace"/>
<<<<<<<
/// <see cref="Trace"/>
=======
/// <see cref="Trace(bool)"/>
>>>>>>>
/// <see cref="Trace"/>
<<<<<<<
/// <exception cref="Antlr4.Runtime.RecognitionException"></exception>
[return: NotNull]
=======
/// <exception cref="Antlr4.Runtime.RecognitionException"/>
[NotNull]
>>>>>>>
/// <exception cref="Antlr4.Runtime.RecognitionException"/>
[return: NotNull]
<<<<<<<
/// <exception cref="Antlr4.Runtime.RecognitionException"></exception>
[return: NotNull]
=======
/// <exception cref="Antlr4.Runtime.RecognitionException"/>
[NotNull]
>>>>>>>
/// <exception cref="Antlr4.Runtime.RecognitionException"/>
[return: NotNull]
<<<<<<<
return Sharpen.Collections.EmptyList<IParseTreeListener>();
=======
return Antlr4.Runtime.Sharpen.Collections.EmptyList();
>>>>>>>
return Sharpen.Collections.EmptyList<IParseTreeListener>();
<<<<<<<
/// <seealso cref="Antlr4.Runtime.Atn.ATN.GetExpectedTokens(int, RuleContext)">Antlr4.Runtime.Atn.ATN.GetExpectedTokens(int, RuleContext)</seealso>
[return: NotNull]
=======
/// <seealso cref="Antlr4.Runtime.Atn.ATN.GetExpectedTokens(int, RuleContext)"/>
[NotNull]
>>>>>>>
/// <seealso cref="Antlr4.Runtime.Atn.ATN.GetExpectedTokens(int, RuleContext)"/>
[return: NotNull] |
<<<<<<<
#if false
private static readonly Logger Logger = Logger.GetLogger(typeof(Antlr4.Runtime.Misc.RuleDependencyChecker
).FullName);
#endif
=======
private static readonly Logger Logger = Logger.GetLogger(typeof(Antlr4.Runtime.Misc.RuleDependencyChecker).FullName);
>>>>>>>
#if false
private static readonly Logger Logger = Logger.GetLogger(typeof(Antlr4.Runtime.Misc.RuleDependencyChecker).FullName);
#endif
<<<<<<<
foreach (KeyValuePair<Type, IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>> entry
in recognizerDependencies)
=======
foreach (KeyValuePair<Type, IList<Tuple<RuleDependency, IAnnotatedElement>>> entry in recognizerDependencies.EntrySet())
>>>>>>>
foreach (KeyValuePair<Type, IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>>> entry in recognizerDependencies)
<<<<<<<
private static void CheckDependencies(IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider
>> dependencies, Type recognizerType)
=======
private static void CheckDependencies<_T0>(IList<Tuple<RuleDependency, IAnnotatedElement>> dependencies, Type<_T0> recognizerType)
where _T0 : Recognizer<object, object>
>>>>>>>
private static void CheckDependencies(IList<Tuple<RuleDependencyAttribute, ICustomAttributeProvider>> dependencies, Type recognizerType)
<<<<<<<
BitSet children = relations.children[dependency.Item1.Rule];
for (int child = children.NextSetBit(0); child >= 0; child = children.NextSetBit(
child + 1))
=======
BitSet children = relations.children[dependency.Item1.Rule()];
for (int child = children.NextSetBit(0); child >= 0; child = children.NextSetBit(child + 1))
>>>>>>>
BitSet children = relations.children[dependency.Item1.Rule];
for (int child = children.NextSetBit(0); child >= 0; child = children.NextSetBit(child + 1))
<<<<<<<
BitSet ancestors = relations.GetAncestors(dependency.Item1.Rule);
for (int ancestor = ancestors.NextSetBit(0); ancestor >= 0; ancestor = ancestors.
NextSetBit(ancestor + 1))
=======
BitSet ancestors = relations.GetAncestors(dependency.Item1.Rule());
for (int ancestor = ancestors.NextSetBit(0); ancestor >= 0; ancestor = ancestors.NextSetBit(ancestor + 1))
>>>>>>>
BitSet ancestors = relations.GetAncestors(dependency.Item1.Rule);
for (int ancestor = ancestors.NextSetBit(0); ancestor >= 0; ancestor = ancestors.NextSetBit(ancestor + 1))
<<<<<<<
BitSet descendants = relations.GetDescendants(dependency.Item1.Rule);
for (int descendant = descendants.NextSetBit(0); descendant >= 0; descendant = descendants
.NextSetBit(descendant + 1))
=======
BitSet descendants = relations.GetDescendants(dependency.Item1.Rule());
for (int descendant = descendants.NextSetBit(0); descendant >= 0; descendant = descendants.NextSetBit(descendant + 1))
>>>>>>>
BitSet descendants = relations.GetDescendants(dependency.Item1.Rule);
for (int descendant = descendants.NextSetBit(0); descendant >= 0; descendant = descendants.NextSetBit(descendant + 1))
<<<<<<<
string message = string.Format("Rule dependency version mismatch: {0} has maximum dependency version {1} (expected {2}) in {3}"
, ruleNames[dependency.Item1.Rule], highestRequiredDependency, declaredVersion
, dependency.Item1.Recognizer.ToString());
errors.AppendLine(dependency.Item2.ToString());
errors.AppendLine(message);
=======
string message = string.Format("Rule dependency version mismatch: %s has maximum dependency version %d (expected %d) in %s%n", ruleNames[dependency.Item1.Rule()], highestRequiredDependency, declaredVersion, dependency.Item1.Recognizer().ToString());
errors.Append(message);
>>>>>>>
string message = string.Format("Rule dependency version mismatch: {0} has maximum dependency version {1} (expected {2}) in {3}", ruleNames[dependency.Item1.Rule], highestRequiredDependency, declaredVersion, dependency.Item1.Recognizer.ToString());
errors.AppendLine(dependency.Item2.ToString());
errors.AppendLine(message);
<<<<<<<
path = string.Format("rule {0} ({1} of {2})", mismatchedRuleName, relation, ruleName
);
=======
path = string.Format("rule %s (%s of %s)", mismatchedRuleName, relation, ruleName);
>>>>>>>
path = string.Format("rule {0} ({1} of {2})", mismatchedRuleName, relation, ruleName);
<<<<<<<
string message = string.Format("Rule dependency version mismatch: {0} has version {1} (expected <= {2}) in {3}"
, path, actualVersion, declaredVersion, dependency.Item1.Recognizer.ToString
());
errors.AppendLine(dependency.Item2.ToString());
errors.AppendLine(message);
=======
string message = string.Format("Rule dependency version mismatch: %s has version %d (expected <= %d) in %s%n", path, actualVersion, declaredVersion, dependency.Item1.Recognizer().ToString());
errors.Append(message);
>>>>>>>
string message = string.Format("Rule dependency version mismatch: {0} has version {1} (expected <= {2}) in {3}", path, actualVersion, declaredVersion, dependency.Item1.Recognizer.ToString());
errors.AppendLine(dependency.Item2.ToString());
errors.AppendLine(message);
<<<<<<<
private static int[] GetRuleVersions(Type recognizerClass, string[] ruleNames
)
=======
private static int[] GetRuleVersions<_T0>(Type<_T0> recognizerClass, string[] ruleNames)
where _T0 : Recognizer<object, object>
>>>>>>>
private static int[] GetRuleVersions(Type recognizerClass, string[] ruleNames)
<<<<<<<
#if false
Logger.Log(Level.Warning, "Rule index {0} for rule ''{1}'' out of bounds for recognizer {2}."
, @params);
#endif
=======
Logger.Log(Level.Warning, "Rule index {0} for rule ''{1}'' out of bounds for recognizer {2}.", @params);
>>>>>>>
#if false
Logger.Log(Level.Warning, "Rule index {0} for rule ''{1}'' out of bounds for recognizer {2}.", @params);
#endif
<<<<<<<
#if false
Logger.Log(Level.Warning, "Could not find rule method for rule ''{0}'' in recognizer {1}."
, @params);
#endif
=======
Logger.Log(Level.Warning, "Could not find rule method for rule ''{0}'' in recognizer {1}.", @params);
>>>>>>>
#if false
Logger.Log(Level.Warning, "Could not find rule method for rule ''{0}'' in recognizer {1}.", @params);
#endif
<<<<<<<
private static MethodInfo GetRuleMethod(Type recognizerClass, string name
)
=======
private static MethodInfo GetRuleMethod<_T0>(Type<_T0> recognizerClass, string name)
where _T0 : Recognizer<object, object>
>>>>>>>
private static MethodInfo GetRuleMethod(Type recognizerClass, string name)
<<<<<<<
foreach (ParameterInfo parameter in method.GetParameters())
GetElementDependencies(AsCustomAttributeProvider(parameter), result);
=======
case ElementType.Parameter:
{
System.Console.Error.WriteLine("Runtime rule dependency checking is not supported for parameters.");
break;
}
}
>>>>>>>
foreach (ParameterInfo parameter in method.GetParameters())
GetElementDependencies(AsCustomAttributeProvider(parameter), result);
<<<<<<<
private static RuleDependencyChecker.RuleRelations ExtractRuleRelations(Type
recognizer)
=======
private static RuleDependencyChecker.RuleRelations ExtractRuleRelations<_T0>(Type<_T0> recognizer)
where _T0 : Recognizer<object, object>
>>>>>>>
private static RuleDependencyChecker.RuleRelations ExtractRuleRelations(Type recognizer)
<<<<<<<
FieldInfo serializedAtnField = recognizerClass.GetField("_serializedATN", AllDeclaredStaticMembers);
if (serializedAtnField != null)
return (string)serializedAtnField.GetValue(null);
if (recognizerClass.BaseType != null)
return GetSerializedATN(recognizerClass.BaseType);
return null;
=======
try
{
FieldInfo serializedAtnField = Sharpen.Runtime.GetDeclaredField(recognizerClass, "_serializedATN");
if (Modifier.IsStatic(serializedAtnField.GetModifiers()))
{
return (string)serializedAtnField.GetValue(null);
}
return null;
}
catch (NoSuchFieldException)
{
if (recognizerClass.BaseType != null)
{
return GetSerializedATN(recognizerClass.BaseType);
}
return null;
}
catch (SecurityException)
{
return null;
}
catch (ArgumentException)
{
return null;
}
catch (MemberAccessException)
{
return null;
}
>>>>>>>
FieldInfo serializedAtnField = recognizerClass.GetField("_serializedATN", AllDeclaredStaticMembers);
if (serializedAtnField != null)
return (string)serializedAtnField.GetValue(null);
if (recognizerClass.BaseType != null)
return GetSerializedATN(recognizerClass.BaseType);
return null; |
<<<<<<<
[return: NotNull]
public string GetTag()
=======
public string Tag
>>>>>>>
[NotNull]
public string Tag
<<<<<<<
[return: Nullable]
public string GetLabel()
=======
public string Label
>>>>>>>
[Nullable]
public string Label |
<<<<<<<
=======
IIntentDonationService intentDonationService,
IDialogService dialogService,
ISchedulerProvider schedulerProvider,
>>>>>>>
IIntentDonationService intentDonationService,
<<<<<<<
Ensure.Argument.IsNotNull(accessRestrictionStorage, nameof(accessRestrictionStorage));
this.remoteConfigService = remoteConfigService;
=======
Ensure.Argument.IsNotNull(intentDonationService, nameof(intentDonationService));
Ensure.Argument.IsNotNull(dialogService, nameof(dialogService));
Ensure.Argument.IsNotNull(schedulerProvider, nameof(schedulerProvider));
>>>>>>>
Ensure.Argument.IsNotNull(accessRestrictionStorage, nameof(accessRestrictionStorage));
Ensure.Argument.IsNotNull(intentDonationService, nameof(intentDonationService));
Ensure.Argument.IsNotNull(dialogService, nameof(dialogService));
Ensure.Argument.IsNotNull(schedulerProvider, nameof(schedulerProvider));
this.remoteConfigService = remoteConfigService; |
<<<<<<<
private static TimeEntry createTimeEntry(IUser user) => new TimeEntry
{
WorkspaceId = user.DefaultWorkspaceId.Value,
Billable = false,
Start = new DateTimeOffset(DateTime.Now - TimeSpan.FromMinutes(5)),
Duration = (long)TimeSpan.FromMinutes(5).TotalSeconds,
Description = Guid.NewGuid().ToString(),
TagIds = new List<long>(),
UserId = user.Id,
CreatedWith = "Ultraware Integration Tests"
};
=======
private static TimeEntry createTimeEntry(IUser user, DateTimeOffset? start = null)
=> new TimeEntry
{
WorkspaceId = user.DefaultWorkspaceId,
Billable = false,
Start = start ?? new DateTimeOffset(DateTime.Now - TimeSpan.FromMinutes(5)),
Duration = (long)TimeSpan.FromMinutes(5).TotalSeconds,
Description = Guid.NewGuid().ToString(),
TagIds = new List<long>(),
UserId = user.Id,
CreatedWith = "Ultraware Integration Tests"
};
>>>>>>>
private static TimeEntry createTimeEntry(IUser user, DateTimeOffset? start = null)
=> new TimeEntry
{
WorkspaceId = user.DefaultWorkspaceId.Value,
Billable = false,
Start = start ?? new DateTimeOffset(DateTime.Now - TimeSpan.FromMinutes(5)),
Duration = (long)TimeSpan.FromMinutes(5).TotalSeconds,
Description = Guid.NewGuid().ToString(),
TagIds = new List<long>(),
UserId = user.Id,
CreatedWith = "Ultraware Integration Tests"
}; |
<<<<<<<
private const double desiredIpadHeight = 360;
private static readonly nfloat nameAlreadyTakenHeight = 16;
=======
private static readonly nfloat errorVisibleHeight = 16;
>>>>>>>
private const double desiredIpadHeight = 360;
private static readonly nfloat errorVisibleHeight = 16; |
<<<<<<<
AvailableOptions = options.Select(toSelectableOption).ToList();
SelectOption = rxActionFactory.FromAction<SelectableCalendarNotificationsOptionViewModel>(onSelectOption);
Close = rxActionFactory.FromAction(() => navigationService.Close(this, Unit.Default));
=======
Close = rxActionFactory.FromAsync(close);
SelectOption = rxActionFactory.FromAction<CalendarNotificationsOption>(onSelectOption);
>>>>>>>
AvailableOptions = options.Select(toSelectableOption).ToList();
SelectOption = rxActionFactory.FromAction<SelectableCalendarNotificationsOptionViewModel>(onSelectOption);
Close = rxActionFactory.FromAsync(close);
<<<<<<<
private void onSelectOption(SelectableCalendarNotificationsOptionViewModel selectableOption)
=======
private Task close()
=> navigationService.Close(this, Unit.Default);
private void onSelectOption(CalendarNotificationsOption option)
>>>>>>>
private Task close()
=> navigationService.Close(this, Unit.Default);
private void onSelectOption(SelectableCalendarNotificationsOptionViewModel selectableOption) |
<<<<<<<
var chosenProject = await Navigate<SelectProjectViewModel, SelectProjectParameter, SelectProjectParameter>(
SelectProjectParameter.WithIds(projectId, taskId, workspaceId));
=======
var chosenProject = await navigationService
.Navigate<SelectProjectViewModel, SelectProjectParameter, SelectProjectParameter>(
new SelectProjectParameter(projectId, taskId, workspaceId));
>>>>>>>
var chosenProject = await Navigate<SelectProjectViewModel, SelectProjectParameter, SelectProjectParameter>(
new SelectProjectParameter(projectId, taskId, workspaceId));
<<<<<<<
var chosenTags = await Navigate<SelectTagsViewModel, (long[], long), long[]>((currentTags, workspaceId));
=======
var chosenTags = await navigationService
.Navigate<SelectTagsViewModel, SelectTagsParameter, long[]>(
new SelectTagsParameter(currentTags, workspaceId));
>>>>>>>
var chosenTags = await Navigate<SelectTagsViewModel, SelectTagsParameter, long[]>(new SelectTagsParameter(currentTags, workspaceId));
<<<<<<<
.SubscribeToErrorsAndCompletion((Exception ex) => Finish(), () => Finish())
=======
.ObserveOn(schedulerProvider.MainScheduler)
.SubscribeToErrorsAndCompletion((Exception ex) => close(), () => close())
>>>>>>>
.ObserveOn(schedulerProvider.MainScheduler)
.SubscribeToErrorsAndCompletion((Exception ex) => Finish(), () => Finish()) |
<<<<<<<
.GroupBy(te => te.Start.LocalDateTime.Date)
.Select(grouping => new TimeEntryViewModelCollection(grouping.Key, grouping, durationFormat));
=======
.GroupBy(te => te.StartTime.LocalDateTime.Date)
.Select(grouping => new TimeEntryViewModelCollection(grouping.Key, grouping, durationFormat))
.ForEach(addTimeEntries);
}
private void addTimeEntries(TimeEntryViewModelCollection collection)
{
IsWelcome = false;
>>>>>>>
.GroupBy(te => te.StartTime.LocalDateTime.Date)
.Select(grouping => new TimeEntryViewModelCollection(grouping.Key, grouping, durationFormat)); |
<<<<<<<
checkCalendarPermissions();
navigationFromMainViewModelStopwatch = stopwatchProvider.Get(MeasuredOperation.OpenSettingsView);
stopwatchProvider.Remove(MeasuredOperation.OpenStartView);
=======
await checkCalendarPermissions();
>>>>>>>
checkCalendarPermissions(); |
<<<<<<<
IIntentDonationService intentDonationService,
IRxActionFactory rxActionFactory,
INavigationService navigationService)
: base(navigationService)
=======
IRxActionFactory rxActionFactory)
>>>>>>>
IRxActionFactory rxActionFactory,
INavigationService navigationService)
: base(navigationService)
<<<<<<<
Ensure.Argument.IsNotNull(timeService, nameof(timeService));
=======
>>>>>>>
Ensure.Argument.IsNotNull(timeService, nameof(timeService));
<<<<<<<
this.timeService = timeService;
this.intentDonationService = intentDonationService;
=======
>>>>>>>
this.timeService = timeService; |
<<<<<<<
private readonly ISchedulerProvider schedulerProvider;
=======
private readonly IPermissionsService permissionsService;
>>>>>>>
private readonly ISchedulerProvider schedulerProvider;
private readonly IPermissionsService permissionsService;
<<<<<<<
this.schedulerProvider = schedulerProvider;
=======
this.permissionsService = permissionsService;
>>>>>>>
this.schedulerProvider = schedulerProvider;
this.permissionsService = permissionsService;
<<<<<<<
IsGroupingTimeEntries =
dataSource.Preferences.Current
.Select(preferences => preferences.CollapseTimeEntries)
.DistinctUntilChanged()
.AsDriver(false, schedulerProvider);
=======
IsCalendarSmartRemindersVisible = calendarPermissionGranted.AsObservable()
.CombineLatest(userPreferences.EnabledCalendars.Select(ids => ids.Any()), CommonFunctions.And);
CalendarSmartReminders = userPreferences.CalendarNotificationsSettings()
.Select(s => s.Title())
.DistinctUntilChanged();
>>>>>>>
IsGroupingTimeEntries =
dataSource.Preferences.Current
.Select(preferences => preferences.CollapseTimeEntries)
.DistinctUntilChanged()
.AsDriver(false, schedulerProvider);
IsCalendarSmartRemindersVisible = calendarPermissionGranted.AsObservable()
.CombineLatest(userPreferences.EnabledCalendars.Select(ids => ids.Any()), CommonFunctions.And);
CalendarSmartReminders = userPreferences.CalendarNotificationsSettings()
.Select(s => s.Title())
.DistinctUntilChanged();
<<<<<<<
Close = rxActionFactory.FromAsync(close);
=======
>>>>>>>
Close = rxActionFactory.FromAsync(close);
<<<<<<<
private Task close()
{
return navigationService.Close(this);
}
=======
private async Task checkCalendarPermissions()
{
var authorized = await permissionsService.CalendarPermissionGranted;
calendarPermissionGranted.OnNext(authorized);
}
>>>>>>>
private async Task checkCalendarPermissions()
{
var authorized = await permissionsService.CalendarPermissionGranted;
calendarPermissionGranted.OnNext(authorized);
}
private Task close() => navigationService.Close(this); |
<<<<<<<
using Toggl.Core.Tests.TestExtensions;
=======
using Toggl.Shared;
>>>>>>>
using Toggl.Core.Tests.TestExtensions;
using Toggl.Shared; |
<<<<<<<
public static string ContinueTimerInvocationPhrase {
get {
return ResourceManager.GetString("ContinueTimerInvocationPhrase", resourceCulture);
}
}
=======
public static string NumberOfTasksPlural {
get {
return ResourceManager.GetString("NumberOfTasksPlural", resourceCulture);
}
}
public static string NumberOfTasksSingular {
get {
return ResourceManager.GetString("NumberOfTasksSingular", resourceCulture);
}
}
>>>>>>>
public static string ContinueTimerInvocationPhrase {
get {
return ResourceManager.GetString("ContinueTimerInvocationPhrase", resourceCulture);
}
}
public static string NumberOfTasksPlural {
get {
return ResourceManager.GetString("NumberOfTasksPlural", resourceCulture);
}
}
public static string NumberOfTasksSingular {
get {
return ResourceManager.GetString("NumberOfTasksSingular", resourceCulture);
}
} |
<<<<<<<
using CoreGraphics;
using MvvmCross.Binding.BindingContext;
using MvvmCross.Platforms.Ios.Binding;
using MvvmCross.Platforms.Ios.Views;
using MvvmCross.Plugin.Color;
=======
using Foundation;
using MvvmCross.Plugin.Color.Platforms.Ios;
using Toggl.Daneel.Extensions;
using Toggl.Daneel.Extensions.Reactive;
>>>>>>>
using CoreGraphics;
using Foundation;
using MvvmCross.Plugin.Color.Platforms.Ios;
using Toggl.Daneel.Extensions;
using Toggl.Daneel.Extensions.Reactive;
<<<<<<<
private const float nameAlreadyTakenHeight = 16;
private const double desiredIpadHeight = 360;
=======
private static readonly nfloat nameAlreadyTakenHeight = 16;
>>>>>>>
private const double desiredIpadHeight = 360;
private static readonly nfloat nameAlreadyTakenHeight = 16; |
<<<<<<<
private string googleToken;
=======
private List<bool> onboardingPagesViewed = new List<bool> { false, false, false };
>>>>>>>
private string googleToken;
private List<bool> onboardingPagesViewed = new List<bool> { false, false, false };
<<<<<<<
analyticsService.ContinueWithEmail.Track();
=======
trackViewedPages();
>>>>>>>
analyticsService.ContinueWithEmail.Track();
trackViewedPages(); |
<<<<<<<
UIViewController createTabFor(IMvxViewModel viewModel)
{
var controller = new UINavigationController();
var screen = this.CreateViewControllerFor(viewModel) as UIViewController;
var item = new UITabBarItem();
item.Title = "";
item.Image = UIImage.FromBundle(imageNameForType[viewModel.GetType()]);
item.ImageInsets = new UIEdgeInsets(6, 0, -6, 0);
screen.TabBarItem = item;
controller.PushViewController(screen, true);
return controller;
}
=======
public override void ViewDidLoad()
{
base.ViewDidLoad();
TabBar.Translucent = UIDevice.CurrentDevice.CheckSystemVersion(11, 0);
}
private void setupViewControllers()
{
var viewControllers = ViewModel.ViewModels.Select(vm => createTabFor(vm)).ToArray();
ViewControllers = viewControllers;
}
private UIViewController createTabFor(IMvxViewModel viewModel)
{
var controller = new UINavigationController();
var screen = this.CreateViewControllerFor(viewModel) as UIViewController;
var item = new UITabBarItem();
item.Title = "";
item.Image = UIImage.FromBundle(imageNameForType[viewModel.GetType()]);
item.ImageInsets = new UIEdgeInsets(6, 0, -6, 0);
screen.TabBarItem = item;
controller.PushViewController(screen, true);
return controller;
>>>>>>>
UIViewController createTabFor(IMvxViewModel viewModel)
{
var controller = new UINavigationController();
var screen = this.CreateViewControllerFor(viewModel) as UIViewController;
var item = new UITabBarItem();
item.Title = "";
item.Image = UIImage.FromBundle(imageNameForType[viewModel.GetType()]);
item.ImageInsets = new UIEdgeInsets(6, 0, -6, 0);
screen.TabBarItem = item;
controller.PushViewController(screen, true);
return controller;
}
}
public override void ViewDidLoad()
{
base.ViewDidLoad();
TabBar.Translucent = UIDevice.CurrentDevice.CheckSystemVersion(11, 0); |
<<<<<<<
=======
var currentDate = timeService.CurrentDateTime.Date;
startDate = currentDate.AddDays(1 - (int)currentDate.DayOfWeek);
endDate = startDate.AddDays(6);
source = ReportsSource.Initial;
>>>>>>>
source = ReportsSource.Initial; |
<<<<<<<
=> new GetByIdInteractor<IThreadSafeTag, IDatabaseTag>(dataSource.Tags, id);
public IInteractor<IObservable<IEnumerable<IThreadSafeTag>>> GetMultipleTagsById(params long[] ids)
=> new GetMultipleByIdInteractor<IThreadSafeTag, IDatabaseTag>(dataSource.Tags, ids);
=======
=> new GetByIdInteractor<IThreadSafeTag, IDatabaseTag>(dataSource.Tags, analyticsService, id)
.TrackException<Exception, IThreadSafeTag>("GetTagById");
>>>>>>>
=> new GetByIdInteractor<IThreadSafeTag, IDatabaseTag>(dataSource.Tags, analyticsService, id)
.TrackException<Exception, IThreadSafeTag>("GetTagById");
public IInteractor<IObservable<IEnumerable<IThreadSafeTag>>> GetMultipleTagsById(params long[] ids)
=> new GetMultipleByIdInteractor<IThreadSafeTag, IDatabaseTag>(dataSource.Tags, ids); |
<<<<<<<
using Toggl.Foundation.Calendar;
=======
using Toggl.Foundation.DTOs;
>>>>>>>
using Toggl.Foundation.Calendar;
using Toggl.Foundation.DTOs;
<<<<<<<
#region Calendar
IInteractor<IObservable<CalendarItem>> GetCalendarItemWithId(string eventId);
IInteractor<IObservable<IEnumerable<CalendarItem>>> GetCalendarItemsForDate(DateTime date);
IInteractor<IObservable<IEnumerable<UserCalendar>>> GetUserCalendars();
IInteractor<Unit> SetEnabledCalendars(params string[] ids);
#endregion
#region Notifications
IInteractor<IObservable<Unit>> UnscheduleAllNotifications();
IInteractor<IObservable<Unit>> ScheduleEventNotificationsForNextWeek();
#endregion
=======
#region Clients
IInteractor<IObservable<IThreadSafeClient>> CreateClient(string clientName, long workspaceId);
IInteractor<IObservable<IEnumerable<IThreadSafeClient>>> GetAllClientsInWorkspace(long workspaceId);
#endregion
#region Tags
IInteractor<IObservable<IThreadSafeTag>> CreateTag(string tagName, long workspaceId);
#endregion
>>>>>>>
#region Calendar
IInteractor<IObservable<CalendarItem>> GetCalendarItemWithId(string eventId);
IInteractor<IObservable<IEnumerable<CalendarItem>>> GetCalendarItemsForDate(DateTime date);
IInteractor<IObservable<IEnumerable<UserCalendar>>> GetUserCalendars();
IInteractor<Unit> SetEnabledCalendars(params string[] ids);
#endregion
#region Notifications
IInteractor<IObservable<Unit>> UnscheduleAllNotifications();
IInteractor<IObservable<Unit>> ScheduleEventNotificationsForNextWeek();
#endregion
#region Clients
IInteractor<IObservable<IThreadSafeClient>> CreateClient(string clientName, long workspaceId);
IInteractor<IObservable<IEnumerable<IThreadSafeClient>>> GetAllClientsInWorkspace(long workspaceId);
#endregion
#region Tags
IInteractor<IObservable<IThreadSafeTag>> CreateTag(string tagName, long workspaceId);
#endregion |
<<<<<<<
private Toolbar toolbar;
private TextInputLayout tokenResetPasswordLayout;
=======
>>>>>>>
private TextInputLayout tokenResetPasswordLayout;
<<<<<<<
toolbar = FindViewById<Toolbar>(Resource.Id.Toolbar);
tokenResetPasswordLayout = FindViewById<TextInputLayout>(Resource.Id.TokenResetPasswordLayout);
=======
>>>>>>>
tokenResetPasswordLayout = FindViewById<TextInputLayout>(Resource.Id.TokenResetPasswordLayout); |
<<<<<<<
=======
AccessibilityService,
UpdateRemoteConfigCacheService,
>>>>>>>
AccessibilityService,
<<<<<<<
=======
bool useAccessibilityService,
bool useRemoteConfigUpdateService,
>>>>>>>
bool useAccessibilityService,
<<<<<<<
=======
var accessibilityService = useAccessibilityService ? AccessibilityService : null;
var remoteConfigUpdateService = useRemoteConfigUpdateService ? UpdateRemoteConfigCacheService : null;
>>>>>>>
var accessibilityService = useAccessibilityService ? AccessibilityService : null;
<<<<<<<
=======
accessibilityService,
remoteConfigUpdateService,
>>>>>>>
accessibilityService, |
<<<<<<<
// We're at the end of a comment. check the condition 2.3 to make sure the text ending is allowed.
isValidComment = !EndsWithSymbolsSequence(p, HtmlSymbolType.OpenAngle, HtmlSymbolType.Bang, HtmlSymbolType.DoubleHyphen);
return true;
=======
// Check condition 2.3: We're at the end of a comment. Check to make sure the text ending is allowed.
isValidComment = !SymbolSequenceEndsWithItems(p, HtmlSymbolType.OpenAngle, HtmlSymbolType.Bang, HtmlSymbolType.DoubleHyphen);
breakLookahead = true;
>>>>>>>
// Check condition 2.3: We're at the end of a comment. Check to make sure the text ending is allowed.
isValidComment = !SymbolSequenceEndsWithItems(p, HtmlSymbolType.OpenAngle, HtmlSymbolType.Bang, HtmlSymbolType.DoubleHyphen);
return true; |
<<<<<<<
=======
using Toggl.Core.UI.ViewModels.Reports;
using UIKit;
using System.Reactive.Disposables;
>>>>>>>
using Toggl.Core.UI.ViewModels.Reports;
using UIKit;
using System.Reactive.Disposables;
<<<<<<<
using Toggl.Foundation.MvvmCross.Extensions;
using Toggl.Foundation.MvvmCross.ViewModels.Reports;
using Toggl.Multivac.Extensions;
using UIKit;
=======
using System.Reactive.Linq;
using Toggl.Shared.Extensions;
using System.Linq;
using Toggl.Shared;
using System.Collections.Generic;
using System.Globalization;
using Toggl.Core.Conversions;
using System.Reactive.Subjects;
using System.Reactive;
using Toggl.Daneel.Cells;
using Toggl.Core;
using Toggl.Core.Extensions;
using Color = Toggl.Core.UI.Helper.Color;
>>>>>>>
using System.Reactive.Linq;
using Toggl.Shared.Extensions;
using System.Linq;
using Toggl.Shared;
using System.Collections.Generic;
using System.Globalization;
using Toggl.Core.Conversions;
using System.Reactive.Subjects;
using System.Reactive;
using Toggl.Daneel.Cells;
using Toggl.Core;
using Toggl.Core.Extensions;
using Color = Toggl.Core.UI.Helper.Color;
<<<<<<<
=======
Item.BillablePercentageObservable
.Subscribe(percentage => BillablePercentageView.Percentage = percentage)
.DisposedBy(disposeBag);
var totalDurationColorObservable = Item.TotalTimeIsZeroObservable
.Select(isZero => isZero
? Core.UI.Helper.Color.Reports.Disabled.ToNativeColor()
: Core.UI.Helper.Color.Reports.TotalTimeActivated.ToNativeColor());
totalDurationColorObservable
.Subscribe(TotalDurationGraph.Rx().TintColor())
.DisposedBy(disposeBag);
totalDurationColorObservable
.Subscribe(TotalDurationLabel.Rx().TextColor())
.DisposedBy(disposeBag);
// Bar chart
Item.WorkspaceHasBillableFeatureEnabled
.Subscribe(ColorsLegendContainerView.Rx().IsVisible())
.DisposedBy(disposeBag);
Item.StartDate
.CombineLatest(
Item.BarChartViewModel.DateFormat,
(startDate, format) => startDate.ToString(format.Short, CultureInfo.InvariantCulture))
.Subscribe(StartDateLabel.Rx().Text())
.DisposedBy(disposeBag);
Item.EndDate
.CombineLatest(
Item.BarChartViewModel.DateFormat,
(endDate, format) => endDate.ToString(format.Short, CultureInfo.InvariantCulture))
.Subscribe(EndDateLabel.Rx().Text())
.DisposedBy(disposeBag);
Item.BarChartViewModel.MaximumHoursPerBar
.Select(hours => $"{hours} h")
.Subscribe(MaximumHoursLabel.Rx().Text())
.DisposedBy(disposeBag);
Item.BarChartViewModel.MaximumHoursPerBar
.Select(hours => $"{hours / 2} h")
.Subscribe(HalfHoursLabel.Rx().Text())
.DisposedBy(disposeBag);
Item.BarChartViewModel.HorizontalLegend
.Where(legend => legend == null)
.Subscribe((DateTimeOffset[] _) =>
{
HorizontalLegendStackView.Subviews.ForEach(subview => subview.RemoveFromSuperview());
StartDateLabel.Hidden = false;
EndDateLabel.Hidden = false;
})
.DisposedBy(disposeBag);
Item.BarChartViewModel.HorizontalLegend
.Where(legend => legend != null)
.CombineLatest(Item.BarChartViewModel.DateFormat, createHorizontalLegendLabels)
.Do(_ =>
{
StartDateLabel.Hidden = true;
EndDateLabel.Hidden = true;
})
.Subscribe(HorizontalLegendStackView.Rx().ArrangedViews())
.DisposedBy(disposeBag);
Item.BarChartViewModel.Bars
.Select(createBarViews)
.Subscribe(BarsStackView.Rx().ArrangedViews())
.DisposedBy(disposeBag);
var spacingObservable = Item.BarChartViewModel.Bars
.CombineLatest(updateLayout, (bars, _) => bars)
.Select(bars => BarsStackView.Frame.Width / bars.Length * barChartSpacingProportion);
spacingObservable
.Subscribe(BarsStackView.Rx().Spacing())
.DisposedBy(disposeBag);
spacingObservable
.Subscribe(HorizontalLegendStackView.Rx().Spacing())
.DisposedBy(disposeBag);
>>>>>>> |
<<<<<<<
using Toggl.Foundation.Analytics;
using Toggl.Foundation.DataSources.Interfaces;
using Toggl.Foundation.Extensions;
=======
>>>>>>>
using Toggl.Foundation.Analytics;
using Toggl.Foundation.DataSources.Interfaces;
using Toggl.Foundation.Extensions;
<<<<<<<
private readonly IBaseDataSource<T> dataSource;
protected readonly IAnalyticsService AnalyticsService;
=======
>>>>>>>
protected readonly IAnalyticsService AnalyticsService;
<<<<<<<
protected BasePushEntityState(IBaseDataSource<T> dataSource, IAnalyticsService analyticsService)
{
this.dataSource = dataSource;
AnalyticsService = analyticsService;
}
protected Func<T, IObservable<T>> Overwrite(T entity)
=> pushedEntity => dataSource.Overwrite(entity, pushedEntity);
protected Func<Exception, IObservable<ITransition>> Fail(T entity, PushSyncOperation operation)
=> exception
=> Observable
.Return(entity)
.Track(typeof(T).ToSyncErrorAnalyticsEvent(AnalyticsService), $"{operation}:{exception.Message}")
.Track(AnalyticsService.EntitySyncStatus, entity.GetSafeTypeName(), $"{operation}:{Resources.Failure}")
.SelectMany(_ => shouldRethrow(exception)
? Observable.Throw<ITransition>(exception)
: Observable.Return(failTransition(entity, exception)));
=======
protected Func<Exception, IObservable<ITransition>> Fail(T entity)
=> exception => shouldRethrow(exception)
? Observable.Throw<ITransition>(exception)
: Observable.Return(failTransition(entity, exception));
>>>>>>>
protected BasePushEntityState(IAnalyticsService analyticsService)
{
AnalyticsService = analyticsService;
}
protected Func<Exception, IObservable<ITransition>> Fail(T entity, PushSyncOperation operation)
=> exception
=> Observable
.Return(entity)
.Track(typeof(T).ToSyncErrorAnalyticsEvent(AnalyticsService), $"{operation}:{exception.Message}")
.Track(AnalyticsService.EntitySyncStatus, entity.GetSafeTypeName(), $"{operation}:{Resources.Failure}")
.SelectMany(_ => shouldRethrow(exception)
? Observable.Throw<ITransition>(exception)
: Observable.Return(failTransition(entity, exception))); |
<<<<<<<
=======
private readonly Lazy<ISuggestionProviderContainer> suggestionProviderContainer;
private readonly Lazy<IPushNotificationsTokenService> pushNotificationsTokenService;
private readonly Lazy<IPushNotificationsTokenStorage> pushNotificationsTokenStorage;
>>>>>>>
private readonly Lazy<IPushNotificationsTokenService> pushNotificationsTokenService;
private readonly Lazy<IPushNotificationsTokenStorage> pushNotificationsTokenStorage;
<<<<<<<
=======
public ISuggestionProviderContainer SuggestionProviderContainer => suggestionProviderContainer.Value;
public IPushNotificationsTokenService PushNotificationsTokenService => pushNotificationsTokenService.Value;
public IPushNotificationsTokenStorage PushNotificationsTokenStorage => pushNotificationsTokenStorage.Value;
>>>>>>>
public IPushNotificationsTokenService PushNotificationsTokenService => pushNotificationsTokenService.Value;
public IPushNotificationsTokenStorage PushNotificationsTokenStorage => pushNotificationsTokenStorage.Value;
<<<<<<<
=======
suggestionProviderContainer = new Lazy<ISuggestionProviderContainer>(CreateSuggestionProviderContainer);
pushNotificationsTokenService = new Lazy<IPushNotificationsTokenService>(CreatePushNotificationsTokenService);
pushNotificationsTokenStorage =
new Lazy<IPushNotificationsTokenStorage>(CreatePushNotificationsTokenStorage);
>>>>>>>
pushNotificationsTokenService = new Lazy<IPushNotificationsTokenService>(CreatePushNotificationsTokenService);
pushNotificationsTokenStorage = new Lazy<IPushNotificationsTokenStorage>(CreatePushNotificationsTokenStorage);
<<<<<<<
=======
protected abstract ISuggestionProviderContainer CreateSuggestionProviderContainer();
protected abstract IPushNotificationsTokenService CreatePushNotificationsTokenService();
>>>>>>>
protected abstract IPushNotificationsTokenService CreatePushNotificationsTokenService(); |
<<<<<<<
public IObservable<bool> IsForAccountLinking { get; }
=======
public IObservable<Unit> GoToNextPageObservable { get; }
>>>>>>>
public IObservable<bool> IsForAccountLinking { get; }
public IObservable<Unit> GoToNextPageObservable { get; }
<<<<<<<
IsForAccountLinking = isForAccountLinking
.DistinctUntilChanged()
.AsDriver(schedulerProvider);
}
public override Task Initialize(OnboardingParameters payload)
{
isForAccountLinking.OnNext(payload.IsForAccountLinking);
emailForLinking = payload.Email;
confirmationCode = payload.ConfirmationCode;
return base.Initialize(payload);
=======
GoToNextPageObservable = Observable
.Interval(TimeSpan.FromSeconds(5), schedulerProvider.MainScheduler)
.SelectValue(Unit.Default)
.AsDriver(schedulerProvider);
>>>>>>>
IsForAccountLinking = isForAccountLinking
.DistinctUntilChanged()
.AsDriver(schedulerProvider);
GoToNextPageObservable = Observable
.Interval(TimeSpan.FromSeconds(5), schedulerProvider.MainScheduler)
.SelectValue(Unit.Default)
.AsDriver(schedulerProvider);
}
public override Task Initialize(OnboardingParameters payload)
{
isForAccountLinking.OnNext(payload.IsForAccountLinking);
emailForLinking = payload.Email;
confirmationCode = payload.ConfirmationCode;
return base.Initialize(payload); |
<<<<<<<
public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
{
var stopwatchForViewHolder = createStopwatchFor(holder);
stopwatchForViewHolder?.Start();
base.OnBindViewHolder(holder, position);
stopwatchForViewHolder?.Stop();
}
private IStopwatch createStopwatchFor(RecyclerView.ViewHolder holder)
{
switch (holder)
{
case MainLogCellViewHolder _:
return StopwatchProvider.MaybeCreateStopwatch(MeasuredOperation.BindMainLogItemVH, probability: 0.1F);
case MainLogSectionViewHolder _:
return StopwatchProvider.MaybeCreateStopwatch(MeasuredOperation.BindMainLogSectionVH, probability: 0.5F);
default:
return StopwatchProvider.Create(MeasuredOperation.BindMainLogSuggestionsVH);
}
}
=======
public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
{
if (holder is MainLogSectionViewHolder mainLogHeader)
{
mainLogHeader.Now = timeService.CurrentDateTime;
}
base.OnBindViewHolder(holder, position);
}
>>>>>>>
public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
{
if (holder is MainLogSectionViewHolder mainLogHeader)
mainLogHeader.Now = timeService.CurrentDateTime;
var stopwatchForViewHolder = createStopwatchFor(holder);
stopwatchForViewHolder?.Start();
base.OnBindViewHolder(holder, position);
stopwatchForViewHolder?.Stop();
}
private IStopwatch createStopwatchFor(RecyclerView.ViewHolder holder)
{
switch (holder)
{
case MainLogCellViewHolder _:
return StopwatchProvider.MaybeCreateStopwatch(MeasuredOperation.BindMainLogItemVH, probability: 0.1F);
case MainLogSectionViewHolder _:
return StopwatchProvider.MaybeCreateStopwatch(MeasuredOperation.BindMainLogSectionVH, probability: 0.5F);
default:
return StopwatchProvider.Create(MeasuredOperation.BindMainLogSuggestionsVH);
}
}
<<<<<<<
var mainLogSectionStopwatch = StopwatchProvider.Create(MeasuredOperation.CreateMainLogSectionViewHolder);
mainLogSectionStopwatch.Start();
var mainLogSectionViewHolder = new MainLogSectionViewHolder(LayoutInflater.FromContext(parent.Context).Inflate(Resource.Layout.MainLogHeader, parent, false));
mainLogSectionStopwatch.Stop();
return mainLogSectionViewHolder;
=======
var header = new MainLogSectionViewHolder(LayoutInflater.FromContext(parent.Context)
.Inflate(Resource.Layout.MainLogHeader, parent, false));
header.Now = timeService.CurrentDateTime;
return header;
>>>>>>>
var mainLogSectionStopwatch = StopwatchProvider.Create(MeasuredOperation.CreateMainLogSectionViewHolder);
mainLogSectionStopwatch.Start();
var mainLogSectionViewHolder = new MainLogSectionViewHolder(LayoutInflater.FromContext(parent.Context)
.Inflate(Resource.Layout.MainLogHeader, parent, false));
mainLogSectionViewHolder.Now = timeService.CurrentDateTime;
mainLogSectionStopwatch.Stop();
return mainLogSectionViewHolder; |
<<<<<<<
using AuthenticationServices;
using Toggl.Core.Helper;
using Toggl.Core.UI.Extensions;
using Toggl.Core.UI.Helper;
=======
using CoreText;
using Foundation;
>>>>>>>
using AuthenticationServices;
using Foundation;
<<<<<<<
private const int iPhoneSeScreenHeight = 568;
private bool keyboardIsOpen = false;
private const int topConstraintForBiggerScreens = 72;
private const int topConstraintForBiggerScreensWithKeyboard = 40;
private const int emailTopConstraint = 42;
private const int emailTopConstraintWithKeyboard = 12;
private const int tabletFormOffset = 246;
private const int tabletLandscapeKeyboardOffset = 90;
private ASAuthorizationAppleIdButton appleSignInButton;
private IDisposable appleSignInButtonDisposable;
public static LoginViewController NewInstance(LoginViewModel viewModel)
=======
private readonly UIStringAttributes plainTextAttributes = new UIStringAttributes
>>>>>>>
private ASAuthorizationAppleIdButton appleSignInButton;
private IDisposable appleSignInButtonDisposable;
private readonly UIStringAttributes plainTextAttributes = new UIStringAttributes
<<<<<<<
setupSignInWithAppleButton();
//Text
=======
var backButton = new UIBarButtonItem("",
UIBarButtonItemStyle.Plain,
(sender, args) => ViewModel.Close());
backButton.TintColor = ColorAssets.IconTint;
NavigationItem.RightBarButtonItem = new UIBarButtonItem(signUpButton);
NavigationItem.LeftBarButtonItem = closeButton;
NavigationItem.BackBarButtonItem = backButton;
//E-mail
>>>>>>>
var backButton = new UIBarButtonItem("",
UIBarButtonItemStyle.Plain,
(sender, args) => ViewModel.Close());
backButton.TintColor = ColorAssets.IconTint;
NavigationItem.RightBarButtonItem = new UIBarButtonItem(signUpButton);
NavigationItem.LeftBarButtonItem = closeButton;
NavigationItem.BackBarButtonItem = backButton;
//E-mail
<<<<<<<
GoogleLoginButton.Rx().Tap()
.Subscribe(_ => ViewModel.ThirdPartyLogin(ThirdPartyLoginProvider.Google))
=======
LoginButton.Rx()
.BindAction(ViewModel.Login)
>>>>>>>
LoginButton.Rx()
.BindAction(ViewModel.Login)
<<<<<<<
public override void TraitCollectionDidChange(UITraitCollection previousTraitCollection)
{
base.TraitCollectionDidChange(previousTraitCollection);
setupSignInWithAppleButton();
}
private void KeyboardWillShow(object sender, UIKeyboardEventArgs e)
=======
protected override void KeyboardWillShow(object sender, UIKeyboardEventArgs e)
>>>>>>>
protected override void KeyboardWillShow(object sender, UIKeyboardEventArgs e)
<<<<<<<
private string loginButtonTitle(bool isLoading)
=> isLoading ? "" : Resources.LoginTitle;
private void setupSignInWithAppleButton()
{
var style = TraitCollection.UserInterfaceStyle == UIUserInterfaceStyle.Light
? ASAuthorizationAppleIdButtonStyle.Black
: ASAuthorizationAppleIdButtonStyle.White;
var newButton = new ASAuthorizationAppleIdButton(ASAuthorizationAppleIdButtonType.SignIn, style);
if (appleSignInButton == null)
{
appleSignInButton = newButton;
ThirdPartyProvidersContainer.InsertArrangedSubview(appleSignInButton, 0);
}
else
{
ThirdPartyProvidersContainer.RemoveArrangedSubview(appleSignInButton);
appleSignInButton = newButton;
ThirdPartyProvidersContainer.InsertArrangedSubview(appleSignInButton, 0);
}
appleSignInButtonDisposable?.Dispose();
appleSignInButtonDisposable = null;
appleSignInButtonDisposable = newButton.Rx().Tap()
.Subscribe(_ => ViewModel.ThirdPartyLogin(ThirdPartyLoginProvider.Apple));
}
=======
var button = new UIButton();
button.SetAttributedTitle(buttonTitle, UIControlState.Normal);
return button;
}
>>>>>>>
var button = new UIButton();
button.SetAttributedTitle(buttonTitle, UIControlState.Normal);
return button;
} |
<<<<<<<
=======
IsInManualMode = userPreferences.IsManualModeEnabled;
handleNoWorkspaceState()
.ContinueWith(_ => handleNoDefaultWorkspaceState());
}
private async Task handleNoWorkspaceState()
{
>>>>>>>
handleNoWorkspaceState()
.ContinueWith(_ => handleNoDefaultWorkspaceState());
}
private async Task handleNoWorkspaceState()
{ |
<<<<<<<
StartTimeEntry = rxActionFactory.FromAsync<Suggestion>(suggestion => startTimeEntry(suggestion));
=======
await base.Initialize();
StartTimeEntry = rxActionFactory.FromObservable<Suggestion, IThreadSafeTimeEntry>(startTimeEntry);
>>>>>>>
base.Initialize();
StartTimeEntry = rxActionFactory.FromObservable<Suggestion, IThreadSafeTimeEntry>(startTimeEntry); |
<<<<<<<
private readonly IIntentDonationService intentDonationService;
=======
private readonly IAccessRestrictionStorage accessRestrictionStorage;
>>>>>>>
private readonly IIntentDonationService intentDonationService;
private readonly IAccessRestrictionStorage accessRestrictionStorage;
<<<<<<<
IIntentDonationService intentDonationService,
=======
IAccessRestrictionStorage accessRestrictionStorage,
>>>>>>>
IIntentDonationService intentDonationService,
IAccessRestrictionStorage accessRestrictionStorage,
<<<<<<<
this.intentDonationService = intentDonationService;
=======
this.accessRestrictionStorage = accessRestrictionStorage;
>>>>>>>
this.intentDonationService = intentDonationService;
this.accessRestrictionStorage = accessRestrictionStorage; |
<<<<<<<
var url = ServerFixture.Url + "/echo";
// The test should connect to the server using WebSockets transport on Windows 8 and newer.
// On Windows 7/2008R2 it should use ServerSentEvents transport to connect to the server.
var connection = new HttpConnection(new Uri(url));
await connection.StartAsync(TransferFormat.Binary).OrTimeout();
await connection.DisposeAsync().OrTimeout();
=======
using (StartVerifableLog(out var loggerFactory))
{
var url = _serverFixture.Url + "/echo";
// The test should connect to the server using WebSockets transport on Windows 8 and newer.
// On Windows 7/2008R2 it should use ServerSentEvents transport to connect to the server.
var connection = new HttpConnection(new Uri(url), HttpTransports.All, loggerFactory);
await connection.StartAsync(TransferFormat.Binary).OrTimeout();
await connection.DisposeAsync().OrTimeout();
}
>>>>>>>
using (StartVerifableLog(out var loggerFactory))
{
var url = ServerFixture.Url + "/echo";
// The test should connect to the server using WebSockets transport on Windows 8 and newer.
// On Windows 7/2008R2 it should use ServerSentEvents transport to connect to the server.
var connection = new HttpConnection(new Uri(url), HttpTransports.All, loggerFactory);
await connection.StartAsync(TransferFormat.Binary).OrTimeout();
await connection.DisposeAsync().OrTimeout();
}
<<<<<<<
var url = ServerFixture.Url + "/echo";
// The test should connect to the server using WebSockets transport on Windows 8 and newer.
// On Windows 7/2008R2 it should use ServerSentEvents transport to connect to the server.
// The test logic lives in the TestTransportFactory and FakeTransport.
var connection = new HttpConnection(new HttpConnectionOptions { Url = new Uri(url) }, null, new TestTransportFactory());
await connection.StartAsync(TransferFormat.Text).OrTimeout();
await connection.DisposeAsync().OrTimeout();
=======
bool ExpectedErrors(WriteContext writeContext)
{
return writeContext.LoggerName == typeof(HttpConnection).FullName &&
writeContext.EventId.Name == "ErrorStartingTransport";
}
using (StartVerifableLog(out var loggerFactory, expectedErrorsFilter: ExpectedErrors))
{
var url = _serverFixture.Url + "/echo";
// The test should connect to the server using WebSockets transport on Windows 8 and newer.
// On Windows 7/2008R2 it should use ServerSentEvents transport to connect to the server.
// The test logic lives in the TestTransportFactory and FakeTransport.
var connection = new HttpConnection(new HttpConnectionOptions { Url = new Uri(url) }, loggerFactory, new TestTransportFactory());
await connection.StartAsync(TransferFormat.Text).OrTimeout();
await connection.DisposeAsync().OrTimeout();
}
>>>>>>>
bool ExpectedErrors(WriteContext writeContext)
{
return writeContext.LoggerName == typeof(HttpConnection).FullName &&
writeContext.EventId.Name == "ErrorStartingTransport";
}
using (StartVerifableLog(out var loggerFactory, expectedErrorsFilter: ExpectedErrors))
{
var url = ServerFixture.Url + "/echo";
// The test should connect to the server using WebSockets transport on Windows 8 and newer.
// On Windows 7/2008R2 it should use ServerSentEvents transport to connect to the server.
// The test logic lives in the TestTransportFactory and FakeTransport.
var connection = new HttpConnection(new HttpConnectionOptions { Url = new Uri(url) }, loggerFactory, new TestTransportFactory());
await connection.StartAsync(TransferFormat.Text).OrTimeout();
await connection.DisposeAsync().OrTimeout();
}
<<<<<<<
using (StartVerifableLog(out var loggerFactory, testName: $"CanStartAndStopConnectionUsingGivenTransport_{transportType}", minLogLevel: LogLevel.Trace))
=======
using (StartVerifableLog(out var loggerFactory, minLogLevel: LogLevel.Trace, testName: $"CanStartAndStopConnectionUsingGivenTransport_{transportType}"))
>>>>>>>
using (StartVerifableLog(out var loggerFactory, minLogLevel: LogLevel.Trace, testName: $"CanStartAndStopConnectionUsingGivenTransport_{transportType}")) |
<<<<<<<
var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider();
var connectionHandler = serviceProvider.GetService<HubConnectionHandler<StreamingHub>>();
var invocationBinder = new Mock<IInvocationBinder>();
invocationBinder.Setup(b => b.GetStreamItemType(It.IsAny<string>())).Returns(typeof(string));
=======
var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
var connectionHandler = serviceProvider.GetService<HubConnectionHandler<StreamingHub>>();
var invocationBinder = new Mock<IInvocationBinder>();
invocationBinder.Setup(b => b.GetReturnType(It.IsAny<string>())).Returns(typeof(string));
>>>>>>>
var serviceProvider = HubConnectionHandlerTestUtils.CreateServiceProvider(null, LoggerFactory);
var connectionHandler = serviceProvider.GetService<HubConnectionHandler<StreamingHub>>();
var invocationBinder = new Mock<IInvocationBinder>();
invocationBinder.Setup(b => b.GetStreamItemType(It.IsAny<string>())).Returns(typeof(string)); |
<<<<<<<
=> new TimeEntriesViewModel(DataSource, InteractorFactory, AnalyticsService, SchedulerProvider, RxActionFactory, TimeService);
=======
=> new TimeEntriesViewModel(DataSource, SyncManager, InteractorFactory, AnalyticsService, SchedulerProvider, RxActionFactory);
>>>>>>>
=> new TimeEntriesViewModel(DataSource, SyncManager, InteractorFactory, AnalyticsService, SchedulerProvider, RxActionFactory, TimeService);
<<<<<<<
() => new TimeEntriesViewModel(dataSource, interactorFactory, analyticsService, schedulerProvider, rxActionFactory, timeService);
=======
() => new TimeEntriesViewModel(dataSource, syncManager, interactorFactory, analyticsService, schedulerProvider, rxActionFactory);
>>>>>>>
() => new TimeEntriesViewModel(dataSource, syncManager, interactorFactory, analyticsService, schedulerProvider, rxActionFactory, timeService);
<<<<<<<
viewModel = new TimeEntriesViewModel(DataSource, InteractorFactory, AnalyticsService, SchedulerProvider, RxActionFactory, TimeService);
viewModel.TimeEntriesPendingDeletion.Subscribe(observer);
=======
viewModel = new TimeEntriesViewModel(DataSource, SyncManager, InteractorFactory, AnalyticsService, SchedulerProvider, RxActionFactory);
viewModel.ShouldShowUndo.Subscribe(observer);
>>>>>>>
viewModel = new TimeEntriesViewModel(DataSource, SyncManager, InteractorFactory, AnalyticsService, SchedulerProvider, RxActionFactory, TimeService);
viewModel.TimeEntriesPendingDeletion.Subscribe(observer);
<<<<<<<
viewModel = new TimeEntriesViewModel(DataSource, InteractorFactory, AnalyticsService, SchedulerProvider, RxActionFactory, TimeService);
viewModel.TimeEntriesPendingDeletion.Subscribe(observer);
=======
viewModel = new TimeEntriesViewModel(DataSource, SyncManager, InteractorFactory, AnalyticsService, SchedulerProvider, RxActionFactory);
viewModel.ShouldShowUndo.Subscribe(observer);
>>>>>>>
viewModel = new TimeEntriesViewModel(DataSource, SyncManager, InteractorFactory, AnalyticsService, SchedulerProvider, RxActionFactory, TimeService);
viewModel.TimeEntriesPendingDeletion.Subscribe(observer); |
<<<<<<<
await Navigate<SelectWorkspaceViewModel, long, long>(defaultWorkspace.Id);
=======
await navigationService
.Navigate<SelectWorkspaceViewModel, SelectWorkspaceParameters, long>(new SelectWorkspaceParameters(Resources.SetDefaultWorkspace, defaultWorkspace.Id));
>>>>>>>
await Navigate<SelectWorkspaceViewModel, SelectWorkspaceParameters, long>(new SelectWorkspaceParameters(Resources.SetDefaultWorkspace, defaultWorkspace.Id));
<<<<<<<
=======
private Task close() => navigationService.Close(this);
>>>>>>> |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.