conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
Check.ThatCode(() =>
{
Check.That(IntValue).IsEqualTo(LongValue);
})
.Throws<FluentCheckException>()
.WithMessage("\nThe checked value is different from the expected one.\nThe checked value:\n\t[42] of type: [int]\nThe expected value:\n\t[42] of type: [long]");
=======
Check.That(intValue).IsEqualTo(longValue);
>>>>>>>
Check.ThatCode(() =>
{
Check.That(IntValue).IsEqualTo(LongValue);
})
.Throws<FluentCheckException>()
.WithMessage("\nThe checked value is different from the expected one.\nThe checked value:\n\t[42] of type: [int]\nThe expected value:\n\t[42] of type: [long]");
<<<<<<<
string first = null;
Check.ThatCode(() =>
{
Check.That(first).IsEqualTo("Kamoulox !");
})
.Throws<FluentCheckException>()
.WithMessage("\nThe checked string is null whereas it must not.\nThe checked string:\n\t[null]\nThe expected string:\n\t[\"Kamoulox !\"]");
=======
Check.That((string) null).IsEqualTo("Kamoulox !");
>>>>>>>
Check.That((string) null).IsEqualTo("Kamoulox !");
Check.ThatCode(() =>
{
Check.That(first).IsEqualTo("Kamoulox !");
})
.Throws<FluentCheckException>()
.WithMessage("\nThe checked string is null whereas it must not.\nThe checked string:\n\t[null]\nThe expected string:\n\t[\"Kamoulox !\"]"); |
<<<<<<<
public void DidNotRaiseAnyOldSyntax()
{
Check.ThatCode(() =>
{
// obsolete signature, kept for coverage
Check.That(() => { new object(); }).ThrowsAny();
})
.Throws<FluentCheckException>()
.WithMessage("\nThe checked code did not raise an exception, whereas it must.");
}
[Test]
=======
[ExpectedException(typeof(FluentCheckException), ExpectedMessage = "\nThe checked code did not raise an exception, whereas it must.\nThe expected exception:\n\tan instance of type: [System.Exception]")]
>>>>>>>
Check.ThatCode(() =>
{
// obsolete signature, kept for coverage
Check.That(() => { new object(); }).ThrowsAny();
})
.Throws<FluentCheckException>()
.WithMessage("\nThe checked code did not raise an exception, whereas it must.");
<<<<<<<
=======
public void CanUseStringChecksOnMessage()
{
Check.ThatCode(() => { throw new LambdaRelatedTests.LambdaExceptionForTest(123, "my error message"); }).Throws<LambdaRelatedTests.LambdaExceptionForTest>().WhichMessage.Contains("error");
}
[Test]
[ExpectedException(typeof(FluentCheckException), ExpectedMessage = "\nThe message of the checked exception is not as expected.\nThe checked exception message:\n\t[\"Err #321 : my error message\"]\nThe expected exception message:\n\t[\"a buggy message\"]")]
>>>>>>>
public void CanUseStringChecksOnMessage()
{
Check.ThatCode(() => { throw new LambdaRelatedTests.LambdaExceptionForTest(123, "my error message"); }).Throws<LambdaRelatedTests.LambdaExceptionForTest>().WhichMessage.Contains("error");
}
[Test] |
<<<<<<<
#pragma warning restore 169
public DummyHeritance()
{
}
public DummyHeritance(int x, int y, int z)
: base(x, y)
{
this.z = z;
}
=======
public int GetDummyZ()
{
return this.z;
}
>>>>>>>
public DummyHeritance()
{
}
public DummyHeritance(int x, int y, int z)
: base(x, y)
{
this.z = z;
} |
<<<<<<<
return (negated || notContains) ? null : FluentMessage.BuildMessage("The {0} is null.").Expected(values).Label("The {0} substring(s):").ToString();
=======
return negated ? null : FluentMessage.BuildMessage("The {0} is null.").For("string").Expected(values).Label("The {0} substring(s):").ToString();
>>>>>>>
return (negated || notContains) ? null : FluentMessage.BuildMessage("The {0} is null.").Expected(values).Label("The {0} substring(s):").ToString();
return negated ? null : FluentMessage.BuildMessage("The {0} is null.").For("string").Expected(values).Label("The {0} substring(s):").ToString(); |
<<<<<<<
Note = user.Note;
IsAfk = user.IsAfk;
=======
Status = ((UserStatus)user.Status).ToString();
>>>>>>>
Status = ((UserStatus)user.Status).ToString();
Note = user.Note;
IsAfk = user.IsAfk;
<<<<<<<
public string Note { get; set; }
public string NoteCss { get { return Note == null ? null : IsAfk ? "afk" : "message"; } }
public bool IsAfk { get; set; }
=======
public string Status { get; set; }
>>>>>>>
public string Status { get; set; }
public string Note { get; set; }
public string NoteCss { get { return Note == null ? null : IsAfk ? "afk" : "message"; } }
public bool IsAfk { get; set; } |
<<<<<<<
protected override string GetTitle(HttpWebResponse response)
{
return response.ResponseUri.AbsoluteUri.ToString();
}
=======
>>>>>>> |
<<<<<<<
user.Hash = email.ToMD5();
var userViewModel = new UserViewModel(user);
=======
ChatUser user = _users[name];
user.Hash = email.ToLowerInvariant().ToMD5();
>>>>>>>
user.Hash = email.ToLowerInvariant().ToMD5();
var userViewModel = new UserViewModel(user); |
<<<<<<<
attributeCounters.TryGetValue(attribute.Name, out var attributeCounter);
attributeCounters[attribute.Name] = attributeCounter + 1;
var accessorName = GetAccessorName(attribute.Name, attributeCounter);
=======
if (AccessorInfo.TryGetValue(attribute.Name, out var accessorInfo))
{
var buffer = ReadAttributeBuffer(vertexBuffer, attribute);
>>>>>>>
attributeCounters.TryGetValue(attribute.Name, out var attributeCounter);
attributeCounters[attribute.Name] = attributeCounter + 1;
var accessorName = GetAccessorName(attribute.Name, attributeCounter);
<<<<<<<
private float[] ReadAttributeBuffer(VBIB vbib, VertexBuffer buffer, VertexAttribute attribute)
=======
private static IDictionary<string, AttributeExportInfo> AccessorInfo = new Dictionary<string, AttributeExportInfo>
{
["POSITION"] = new AttributeExportInfo
{
GltfAccessorName = "POSITION",
NumComponents = 3,
Resize = true,
},
["NORMAL"] = new AttributeExportInfo
{
GltfAccessorName = "NORMAL",
NumComponents = 3,
Resize = false,
},
["TEXCOORD"] = new AttributeExportInfo
{
GltfAccessorName = "TEXCOORD_0",
NumComponents = 2,
},
};
private static float[] ReadAttributeBuffer(VertexBuffer buffer, VertexAttribute attribute)
>>>>>>>
private static float[] ReadAttributeBuffer(VertexBuffer buffer, VertexAttribute attribute)
<<<<<<<
private int[] ReadIndices(IndexBuffer indexBuffer, int start, int count)
=======
private static int[] ReadIndices(IndexBuffer indexBuffer)
>>>>>>>
private static int[] ReadIndices(IndexBuffer indexBuffer, int start, int count)
<<<<<<<
private Vector3[] ToVector3Array(float[] buffer)
=======
// NOTE: Swaps Y and Z axes - gltf up axis is Y (source engine up is Z)
// Also divides by 100, gltf units are in meters, source engine units are in inches
// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#coordinate-system-and-units
private static Vector3[] ToVector3Array(float[] buffer, bool swapAxes = true, bool resize = false)
>>>>>>>
private static Vector3[] ToVector3Array(float[] buffer) |
<<<<<<<
Program.Client.Rpc.LoadDeck(ids, keys, groups, SleeveManager.Instance.GetSleeveString(LastLoadedDeck.SleeveId));
=======
Program.Client.Rpc.LoadDeck(ids, keys, groups,sizes, SleeveManager.Instance.GetSleeveString(deck.SleeveId));
>>>>>>>
Program.Client.Rpc.LoadDeck(ids, keys, groups,sizes, SleeveManager.Instance.GetSleeveString(LastLoadedDeck.SleeveId)); |
<<<<<<<
public void LoadDeck(int[] id, Guid[] type, Group[] group, string sleeve)
=======
public void LoadDeck(int[] id, ulong[] type, Group[] group, string[] size, string sleeve)
>>>>>>>
public void LoadDeck(int[] id, Guid[] type, Group[] group, string[] size, string sleeve)
<<<<<<<
public void CreateCard(int[] id, Guid[] type, Group group)
=======
public void CreateCard(int[] id, ulong[] type, string[] size, Group group)
>>>>>>>
public void CreateCard(int[] id, Guid[] type, string[] size, Group group)
<<<<<<<
foreach (Guid g in type)
writer.Write(g.ToByteArray());
=======
foreach (ulong p in type)
writer.Write(p);
writer.Write((short)size.Length);
foreach (string s in size)
writer.Write(s);
>>>>>>>
foreach (Guid g in type)
writer.Write(g.ToByteArray());
writer.Write((short)size.Length);
foreach (string s in size)
writer.Write(s); |
<<<<<<<
private Color? _highlight;
private bool isAlternate = false;
private bool isAlternateImage =false;
internal bool mayBeConsideredFaceUp; /* For better responsiveness, turning a card face down is applied immediately,
=======
private double _x, _y;
private CardDef definition;
private bool faceUp;
private Group group;
private bool isAlternateImage;
internal bool mayBeConsideredFaceUp;
/* For better responsiveness, turning a card face down is applied immediately,
>>>>>>>
private double _x, _y;
private CardDef definition;
private bool faceUp;
private Group group;
private bool isAlternate = false;
private bool isAlternateImage;
internal bool mayBeConsideredFaceUp;
/* For better responsiveness, turning a card face down is applied immediately,
<<<<<<<
internal Card(Player owner, int id, ulong key, Definitions.CardDef def, Data.CardModel model, bool mySecret)
: base(owner)
{
this.id = id;
this.Type = new CardIdentity(id) { alias = false, key = key, model = model, mySecret = mySecret };
definition = def;
All.Add(id, this);
isAlternateImage = false;
isAlternate = false;
}
=======
>>>>>>> |
<<<<<<<
var retCard = new Play.Card(player, id, Program.GameEngine.Definition.GetCardById(card.Id), true);
=======
var retCard = new Play.Card(player, id, key, Program.GameEngine.Definition.GetCardById(card.Id), true, card.Size.Name);
>>>>>>>
var retCard = new Play.Card(player, id, Program.GameEngine.Definition.GetCardById(card.Id), true, card.Size.Name); |
<<<<<<<
=======
private bool isLoaded;
private object playerLock;
>>>>>>>
private object playerLock;
<<<<<<<
this.totalTime = new BehaviorSubject<TimeSpan>(TimeSpan.Zero);
=======
this.playerLock = new object();
>>>>>>>
this.totalTime = new BehaviorSubject<TimeSpan>(TimeSpan.Zero);
this.playerLock = new object();
<<<<<<<
this.totalTime.OnNext(this.inputStream.TotalTime);
=======
// NAudio can throw a broad range of exceptions when opening a song, so we catch everything
catch (Exception ex)
{
throw new SongLoadException("Song could not be loaded.", ex);
}
this.isLoaded = true;
}
>>>>>>>
// NAudio can throw a broad range of exceptions when opening a song, so we catch everything
catch (Exception ex)
{
throw new SongLoadException("Song could not be loaded.", ex);
}
this.totalTime.OnNext(this.inputStream.TotalTime);
}
<<<<<<<
this.EnsureState(NAudio.Wave.PlaybackState.Paused);
this.SetPlaybackState(AudioPlayerState.Paused);
=======
this.EnsureState(AudioPlayerState.Paused);
}
>>>>>>>
this.EnsureState(NAudio.Wave.PlaybackState.Paused);
this.SetPlaybackState(AudioPlayerState.Paused);
}
<<<<<<<
bool wasPaused = this.PlaybackState.First() == AudioPlayerState.Paused;
=======
if (this.wavePlayer == null || this.inputStream == null || this.wavePlayer.PlaybackState == NAudio.Wave.PlaybackState.Playing)
return;
>>>>>>>
if (this.wavePlayer == null || this.inputStream == null || this.wavePlayer.PlaybackState == NAudio.Wave.PlaybackState.Playing)
return;
<<<<<<<
if (!wasPaused)
{
while (this.PlaybackState.First() != AudioPlayerState.Stopped)
=======
catch (MmException ex)
>>>>>>>
catch (MmException ex)
<<<<<<<
this.EnsureState(NAudio.Wave.PlaybackState.Playing);
this.SetPlaybackState(AudioPlayerState.Playing);
=======
if (!wasPaused)
{
while (this.PlaybackState != AudioPlayerState.Stopped && this.PlaybackState != AudioPlayerState.None)
{
this.UpdateSongState();
Thread.Sleep(250);
}
}
});
this.EnsureState(AudioPlayerState.Playing);
}
>>>>>>>
if (!wasPaused)
{
while (this.PlaybackState.First() != AudioPlayerState.Stopped)
{
this.UpdateSongState();
Thread.Sleep(250);
}
}
});
this.EnsureState(NAudio.Wave.PlaybackState.Playing);
this.SetPlaybackState(AudioPlayerState.Playing);
}
<<<<<<<
this.EnsureState(NAudio.Wave.PlaybackState.Stopped);
this.SetPlaybackState(AudioPlayerState.Stopped);
=======
this.EnsureState(AudioPlayerState.Stopped);
this.isLoaded = false;
}
>>>>>>>
this.EnsureState(NAudio.Wave.PlaybackState.Stopped);
this.SetPlaybackState(AudioPlayerState.Stopped);
} |
<<<<<<<
private readonly ObservableCollection<Player> playersPeeking = new ObservableCollection<Player>();
// List of players, who had peeked at this card. The list is reset when the card changes group.
private Color? _highlight;
private bool _selected;
private Player _target;
private double _x, _y;
private CardDef definition;
private bool faceUp;
private Group group;
private bool isAlternate = false;
private bool isAlternateImage;
internal bool mayBeConsideredFaceUp;
=======
private readonly ObservableCollection<Player> _playersPeeking = new ObservableCollection<Player>();
internal bool MayBeConsideredFaceUp;
>>>>>>>
private readonly ObservableCollection<Player> _playersPeeking = new ObservableCollection<Player>();
internal bool MayBeConsideredFaceUp;
private bool isAlternate = false;
<<<<<<<
isAlternate = false;
isAlternateImage = false;
=======
_isAlternateImage = false;
>>>>>>>
_isAlternate = false;
_isAlternateImage = false;
<<<<<<<
if (group != null)
{
// Remove the card from peeking lists
foreach (var lookedCards in group.lookedAt.Values)
lookedCards.Remove(this);
}
group = value;
// Clear the target status
SetTargetedBy(null);
// Clear highlights
SetHighlight(null);
// Remove all markers (TODO: should this be configurable per game?)
markers.Clear();
// Remove from selection (if any)
Selection.Remove(this);
// Remove any player looking at the card (if any)
playersLooking.Clear();
// Clear peeking (if any)
PeekingPlayers.Clear();
//Switch back to original image.
IsAlternateImage = false; //This actually changes the image?
//if (switchWithAlternateOnGroupChange) TODO
//{ switchWithAlternate(); }
=======
// Remove the card from peeking lists
foreach (List<Card> lookedCards in _group.LookedAt.Values)
lookedCards.Remove(this);
>>>>>>>
// Remove the card from peeking lists
foreach (List<Card> lookedCards in _group.LookedAt.Values)
lookedCards.Remove(this); |
<<<<<<<
card = new Play.Card(owner, c.Id, model, owner == Play.Player.LocalPlayer);
=======
card = new Play.Card(owner, c.Id, ulong.Parse(c.EncType), model, owner == Play.Player.LocalPlayer,c.Size);
>>>>>>>
card = new Play.Card(owner, c.Id, model, owner == Play.Player.LocalPlayer,c.Size); |
<<<<<<<
if (value == null) return;
cardImage.Source = new BitmapImage(value.GetCardBackUri());//Sets initial preview to default backing (!isFaceUp Image)
=======
cardImage.Source = new BitmapImage(value.GetCardBackUri());
>>>>>>>
cardImage.Source = new BitmapImage(value.GetCardBackUri());//Sets initial preview to default backing (!isFaceUp Image) |
<<<<<<<
// TODO: why a SortedList? Wouldn't a Dictionary be sufficient?
private readonly SortedList<Guid, MarkerModel> markersById = new SortedList<Guid, MarkerModel>();
private readonly List<CardModel> recentCards = new List<CardModel>(MaxRecentCards);
private readonly List<MarkerModel> recentMarkers = new List<MarkerModel>(MaxRecentMarkers);
//wouldn't a heap be best for these caches?
=======
>>>>>>>
//wouldn't a heap be best for these caches? |
<<<<<<<
/*
* The CardModel holds all the information the Set Definition gives to us. Access to the model itself
* I would expect to be off limits.
*
* */
public static Uri GetPictureUri(Game game, Guid setId, string imageUri)
{
return new Uri(game.GetSet(setId).GetPackUri() + imageUri);
}
public Guid Id { get; internal set; }
public string Name { get; internal set; }
public string ImageUri { get; internal set; }
=======
>>>>>>>
/*
* The CardModel holds all the information the Set Definition gives to us. Access to the model itself
* I would expect to be off limits.
*
* */
<<<<<<<
internal static CardModel FromDataRow(Game game, System.Data.DataRow row)
=======
internal static CardModel FromDataRow(Game game, DataRow row)
>>>>>>>
internal static CardModel FromDataRow(Game game, DataRow row) |
<<<<<<<
arg1[i] = new Guid(reader.ReadBytes(16));
int arg2 = reader.ReadInt32();
handler.CreateCard(arg0, arg1, arg2);
=======
arg1[i] = reader.ReadUInt64();
length = reader.ReadInt16();
string[] arg2 = new string[length];
for (int i = 0; i < length; ++i)
arg2[i] = reader.ReadString();
int arg3 = reader.ReadInt32();
handler.CreateCard(arg0, arg1, arg2, arg3);
>>>>>>>
arg1[i] = new Guid(reader.ReadBytes(16));
length = reader.ReadInt16();
string[] arg2 = new string[length];
for (int i = 0; i < length; ++i)
arg2[i] = reader.ReadString();
int arg3 = reader.ReadInt32();
handler.CreateCard(arg0, arg1, arg2, arg3); |
<<<<<<<
public DataVisualState DataStringState
{
get => (DataVisualState)GetValue(OffSetDataStringStateProperty);
=======
/// <summary>
/// Visually change de state of the byte
/// </summary>
public DataVisualState DataStringState
{
get => (DataVisualState)GetValue(OffSetDataStringStateProperty);
>>>>>>>
/// <summary>
/// Visually change de state of the byte
/// </summary>
public DataVisualState DataStringState
{
get => (DataVisualState)GetValue(OffSetDataStringStateProperty);
<<<<<<<
=======
headerLabel.Width =
DataStringState == DataVisualState.Changes ? 25 :
DataStringState == DataVisualState.ChangesPercent ? 35 : 20;
>>>>>>> |
<<<<<<<
case MeasureType.Position:
return Current_Status.playing_position;
=======
case MeasureType.PositionSeconds:
return (parent.Status?.PlayingPosition).GetValueOrDefault();
>>>>>>>
case MeasureType.Position:
return (parent.Status?.PlayingPosition).GetValueOrDefault();
<<<<<<<
case MeasureType.Length:
return Current_Status.track.length;
=======
case MeasureType.LengthSeconds:
return (parent.Status?.Track?.Length).GetValueOrDefault();
>>>>>>>
case MeasureType.Length:
return (parent.Status?.Track?.Length).GetValueOrDefault(); |
<<<<<<<
if ( TextHelper.TextTimestampExpired( phrase, 2000 ) )
=======
if (TextHelper.TextTimestampExpired(phrase, 3000))
>>>>>>>
if ( TextHelper.TextTimestampExpired( phrase, 2000 ) )
ReadText();
TextHelper.UpdateTextTimestamp(phrase);
}
if (TextCache.ContainsKey(phrase)) return TextCache[phrase];
if (PhraseCache.ContainsKey(phrase)) return PhraseCache[phrase];
return new Point(0, 0);
}
public static bool TextExists2(string processName, string phrase)
{
Stopwatch st = Stopwatch.StartNew();
Bitmap capture = ApplicationCapture.CaptureApplication(processName);
Page page = Engine.Process(capture);
string text = page.GetText();
capture.Dispose();
page.Dispose();
return text.Contains(phrase);
}
public static bool TextExists(string phrase)
{
if (TextHelper.TextTimestampExpired(phrase, 2000))
<<<<<<<
if ( TextHelper.TextTimestampExpired( phrase, 2000 ) )
=======
page.Dispose();
return text.Contains(phrase);
}
public static bool TextExists(string phrase)
{
if (TextHelper.TextTimestampExpired(phrase, 2000))
>>>>>>>
page.Dispose();
return text.Contains(phrase);
}
public static bool TextExists(string phrase)
{
if (TextHelper.TextTimestampExpired(phrase, 2000))
<<<<<<<
Console.WriteLine( "Saving results...");
=======
>>>>>>>
Console.WriteLine( "Saving results...");
<<<<<<<
TextCache.Add(
WLines[ i ],
new Point(
Convert.ToInt32( ( WRects[ i ].X + ( WRects[ i ].Width / 2 ) ) * 1 ),
Convert.ToInt32( ( WRects[ i ].Y + ( WRects[ i ].Height / 2 ) ) * 1 )
=======
TextCache.Add(
WLines[i],
new Point(
WRects[i].X + (WRects[i].Width / 2),
WRects[i].Y + (WRects[i].Height / 2)
>>>>>>>
TextCache.Add(
WLines[ i ],
new Point(
Convert.ToInt32( ( WRects[ i ].X + ( WRects[ i ].Width / 2 ) ) * 1 ),
Convert.ToInt32( ( WRects[ i ].Y + ( WRects[ i ].Height / 2 ) ) * 1 ) |
<<<<<<<
GuildBuff,
=======
RelationshipEXP,
Mentee,
Mentor,
>>>>>>>
RelationshipEXP,
Mentee,
Mentor,
GuildBuff,
<<<<<<<
FriendUpdate,
GuildBuffList
=======
FriendUpdate,
LoverUpdate,
MentorUpdate,
>>>>>>>
FriendUpdate,
LoverUpdate,
MentorUpdate,
GuildBuffList
<<<<<<<
case (short)ServerPacketIds.GuildBuffList:
return new S.GuildBuffList();
=======
case (short)ServerPacketIds.LoverUpdate:
return new S.LoverUpdate();
case (short)ServerPacketIds.MentorUpdate:
return new S.MentorUpdate();
>>>>>>>
case (short)ServerPacketIds.LoverUpdate:
return new S.LoverUpdate();
case (short)ServerPacketIds.MentorUpdate:
return new S.MentorUpdate();
case (short)ServerPacketIds.GuildBuffList:
return new S.GuildBuffList(); |
<<<<<<<
case (short)ServerPacketIds.ResizeInventory:
ResizeInventory((S.ResizeInventory)p);
break;
=======
case (short)ServerPacketIds.NewIntelligentCreature://IntelligentCreature
NewIntelligentCreature((S.NewIntelligentCreature)p);
break;
case (short)ServerPacketIds.UpdateIntelligentCreatureList://IntelligentCreature
UpdateIntelligentCreatureList((S.UpdateIntelligentCreatureList)p);
break;
case (short)ServerPacketIds.IntelligentCreatureEnableRename://IntelligentCreature
IntelligentCreatureEnableRename((S.IntelligentCreatureEnableRename)p);
break;
>>>>>>>
case (short)ServerPacketIds.ResizeInventory:
ResizeInventory((S.ResizeInventory)p);
break;
case (short)ServerPacketIds.NewIntelligentCreature://IntelligentCreature
NewIntelligentCreature((S.NewIntelligentCreature)p);
break;
case (short)ServerPacketIds.UpdateIntelligentCreatureList://IntelligentCreature
UpdateIntelligentCreatureList((S.UpdateIntelligentCreatureList)p);
break;
case (short)ServerPacketIds.IntelligentCreatureEnableRename://IntelligentCreature
IntelligentCreatureEnableRename((S.IntelligentCreatureEnableRename)p);
break; |
<<<<<<<
RemovePet,
ConquestGuard,
ConquestGate,
ConquestWall,
ConquestSiege,
TakeConquestGold,
SetConquestRate,
StartConquest,
ScheduleConquest,
OpenGate,
CloseGate,
=======
RemovePet,
Break
>>>>>>>
RemovePet
RemovePet,
ConquestGuard,
ConquestGate,
ConquestWall,
ConquestSiege,
TakeConquestGold,
SetConquestRate,
StartConquest,
ScheduleConquest,
OpenGate,
CloseGate,
<<<<<<<
HasBagSpace,
CheckConquest,
AffordGuard,
AffordGate,
AffordWall,
AffordSiege,
CheckPermission,
ConquestAvailable,
ConquestOwner,
=======
HasBagSpace,
IsNewHuman
>>>>>>>
HasBagSpace,
IsNewHuman
HasBagSpace,
CheckConquest,
AffordGuard,
AffordGate,
AffordWall,
AffordSiege,
CheckPermission,
ConquestAvailable,
ConquestOwner, |
<<<<<<<
GuildBuffList,
GameShopInfo,
GameShopStock,
=======
GuildBuffList,
NPCRequestInput
>>>>>>>
GuildBuffList,
NPCRequestInput,
GameShopInfo,
GameShopStock,
<<<<<<<
GuildBuffUpdate,
GameshopBuy
=======
GuildBuffUpdate,
NPCConfirmInput
>>>>>>>
GuildBuffUpdate,
NPCConfirmInput,
GameshopBuy,
<<<<<<<
case (short)ClientPacketIds.GameshopBuy:
return new C.GameshopBuy();
=======
case (short)ClientPacketIds.NPCConfirmInput:
return new C.NPCConfirmInput();
>>>>>>>
case (short)ClientPacketIds.GameshopBuy:
return new C.GameshopBuy();
case (short)ClientPacketIds.NPCConfirmInput:
return new C.NPCConfirmInput();
<<<<<<<
case (short)ServerPacketIds.GameShopInfo:
return new S.GameShopInfo();
case (short)ServerPacketIds.GameShopStock:
return new S.GameShopStock();
=======
case (short)ServerPacketIds.NPCRequestInput:
return new S.NPCRequestInput();
>>>>>>>
case (short)ServerPacketIds.GameShopInfo:
return new S.GameShopInfo();
case (short)ServerPacketIds.GameShopStock:
return new S.GameShopStock();
case (short)ServerPacketIds.NPCRequestInput:
return new S.NPCRequestInput(); |
<<<<<<<
case 71://Sabuk Archer
return new ConquestArcher(info);
case 72:
return new Gate(info);
case 73:
return new Wall(info);
=======
>>>>>>>
case 71:
return new SabukGate(info);
case 71://Sabuk Archer
return new ConquestArcher(info);
case 72:
return new Gate(info);
case 73:
return new Wall(info); |
<<<<<<<
for (int i = 0; i < GameShopList.Count; i++)
{
if (GameShopList[i].Info.Index == Info.Index) return;
}
GameShopList.Add(new GameShopItem { GoldPrice = (uint)(1000 * Settings.CredxGold), CreditPrice = 1000, ItemIndex = Info.Index, Info = Info, Date = DateTime.Now, Class = "All", Category = Info.Type.ToString() });
=======
GameShopList.Add(new GameShopItem { GIndex = ++GameshopIndex, GoldPrice = (uint)(1000*Settings.CredxGold), CreditPrice = 1000, ItemIndex = Info.Index, Info = Info, Date = DateTime.Now, Class = "All", Catagory = Info.Type.ToString() });
>>>>>>>
GameShopList.Add(new GameShopItem { GIndex = ++GameshopIndex, GoldPrice = (uint)(1000 * Settings.CredxGold), CreditPrice = 1000, ItemIndex = Info.Index, Info = Info, Date = DateTime.Now, Class = "All", Category = Info.Type.ToString() }); |
<<<<<<<
public int ResizeInventory()
{
if (Inventory.Length >= 86) return Inventory.Length;
if (Inventory.Length == 46)
Array.Resize(ref Inventory, Inventory.Length + 8);
else
Array.Resize(ref Inventory, Inventory.Length + 4);
return Inventory.Length;
}
=======
//IntelligentCreature
public bool CheckHasIntelligentCreature(IntelligentCreatureType petType)
{
for (int i = 0; i < IntelligentCreatures.Count; i++)
if (IntelligentCreatures[i].PetType == petType) return true;
return false;
}
>>>>>>>
//IntelligentCreature
public bool CheckHasIntelligentCreature(IntelligentCreatureType petType)
{
for (int i = 0; i < IntelligentCreatures.Count; i++)
if (IntelligentCreatures[i].PetType == petType) return true;
return false;
}
public int ResizeInventory()
{
if (Inventory.Length >= 86) return Inventory.Length;
if (Inventory.Length == 46)
Array.Resize(ref Inventory, Inventory.Length + 8);
else
Array.Resize(ref Inventory, Inventory.Length + 4);
return Inventory.Length;
} |
<<<<<<<
if (!Settings.Instance.AddDescription) ev.Description = "";
if (Settings.Instance.SyncDirection == Sync.Direction.GoogleToOutlook || !Settings.Instance.AddDescription_OnlyToGoogle) {
if (Sync.Engine.CompareAttribute("Description", Sync.Direction.GoogleToOutlook, ev.Description, ai.Body, sb, ref itemModified))
ai.Body = ev.Description;
=======
if (Settings.Instance.AddDescription) {
if (Settings.Instance.SyncDirection == SyncDirection.GoogleToOutlook || !Settings.Instance.AddDescription_OnlyToGoogle) {
if (MainForm.CompareAttribute("Description", SyncDirection.GoogleToOutlook, ev.Description, ai.Body, sb, ref itemModified))
ai.Body = ev.Description;
}
>>>>>>>
if (Settings.Instance.AddDescription) {
if (Settings.Instance.SyncDirection == Sync.Direction.GoogleToOutlook || !Settings.Instance.AddDescription_OnlyToGoogle) {
if (Sync.Engine.CompareAttribute("Description", Sync.Direction.GoogleToOutlook, ev.Description, ai.Body, sb, ref itemModified))
ai.Body = ev.Description;
} |
<<<<<<<
this.ddCategoryColour = new OutlookGoogleCalendarSync.Extensions.ColourPicker();
=======
this.cbOnlyRespondedInvites = new System.Windows.Forms.CheckBox();
this.lDonateTip = new System.Windows.Forms.Label();
>>>>>>>
this.ddCategoryColour = new OutlookGoogleCalendarSync.Extensions.ColourPicker();
this.lDonateTip = new System.Windows.Forms.Label();
<<<<<<<
private System.Windows.Forms.CheckBox cbColour;
private System.Windows.Forms.Panel panelSyncOptions;
private System.Windows.Forms.PictureBox pbExpandHow;
private System.Windows.Forms.PictureBox pbExpandWhat;
private System.Windows.Forms.PictureBox pbExpandWhen;
private System.Windows.Forms.CheckBox btCloseRegexRules;
private System.Windows.Forms.CheckBox cbAddColours;
public Extensions.ColourPicker ddCategoryColour;
=======
private System.Windows.Forms.Label lDonateTip;
>>>>>>>
private System.Windows.Forms.CheckBox cbColour;
private System.Windows.Forms.Panel panelSyncOptions;
private System.Windows.Forms.PictureBox pbExpandHow;
private System.Windows.Forms.PictureBox pbExpandWhat;
private System.Windows.Forms.PictureBox pbExpandWhen;
private System.Windows.Forms.CheckBox btCloseRegexRules;
private System.Windows.Forms.CheckBox cbAddColours;
public Extensions.ColourPicker ddCategoryColour;
private System.Windows.Forms.Label lDonateTip; |
<<<<<<<
=======
>>>>>>>
<<<<<<<
}
//Add the Outlook appointment ID into Google event
CustomProperty.AddOutlookIDs(ref ev, ai);
=======
} else
ev.Reminders.UseDefault = Settings.Instance.UseGoogleDefaultReminder;
//Add the Outlook appointment ID into Google event
CustomProperty.AddOutlookIDs(ref ev, ai);
>>>>>>>
}
//Add the Outlook appointment ID into Google event
CustomProperty.AddOutlookIDs(ref ev, ai); |
<<<<<<<
} catch (System.ArgumentNullException ex) {
OGCSexception.Analyse("It seems that Outlook has just been closed.", OGCSexception.LogAsFail(ex));
OutlookOgcs.Calendar.Instance.Reset();
filtered = FilterCalendarEntries(Instance.UseOutlookCalendar.Items, suppressAdvisories: suppressAdvisories);
} catch (System.Exception ex) {
=======
} catch (System.Exception) {
>>>>>>>
} catch (System.ArgumentNullException ex) {
OGCSexception.Analyse("It seems that Outlook has just been closed.", OGCSexception.LogAsFail(ex));
OutlookOgcs.Calendar.Instance.Reset();
filtered = FilterCalendarEntries(Instance.UseOutlookCalendar.Items, suppressAdvisories: suppressAdvisories);
} catch (System.Exception) { |
<<<<<<<
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
=======
using App.Metrics;
using App.Metrics.Configuration;
using App.Metrics.Extensions.Reporting.Graphite;
using App.Metrics.Extensions.Reporting.Graphite.Client;
using Couchbase;
using Couchbase.Configuration.Client;
using Couchbase.Core.Serialization;
using Engine;
using Engine.Core.Rules;
using Engine.Drivers.Context;
using Engine.Drivers.Rules;
using FSharpUtils.Newtonsoft;
>>>>>>>
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using App.Metrics;
using App.Metrics.Configuration;
using App.Metrics.Extensions.Reporting.Graphite;
using App.Metrics.Extensions.Reporting.Graphite.Client;
using Engine;
using Engine.Core.Rules;
using Engine.Drivers.Context;
using Engine.Drivers.Rules;
<<<<<<<
using TweekContractResolver;
=======
using Tweek.ApiService.NetCore.Diagnostics;
using Tweek.ApiService.NetCore.Metrics;
using Tweek.ApiService.NetCore.Security;
using Tweek.Drivers.Blob;
using Tweek.Drivers.Blob.WebClient;
using Tweek.Drivers.CouchbaseDriver;
using Tweek.JPad;
using Tweek.JPad.Utils;
using Tweek.Utils;
>>>>>>>
using Scrutor;
using Tweek.ApiService.NetCore.Diagnostics;
using Tweek.ApiService.NetCore.Metrics;
using Tweek.Drivers.Blob;
using Tweek.Drivers.Blob.WebClient;
using Tweek.JPad;
using Tweek.JPad.Utils;
<<<<<<<
=======
internal class TweekContractResolver : DefaultContractResolver
{
protected override JsonContract CreateContract(Type objectType)
{
var contract = base.CreateContract(objectType);
if (typeof(JsonValue).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()))
{
contract.Converter = new JsonValueConverter();
}
return contract;
}
}
>>>>>>>
<<<<<<<
services.InstallServiceAddons(Configuration);
=======
var contextBucketName = Configuration["Couchbase.BucketName"];
var contextBucketPassword = Configuration["Couchbase.Password"];
InitCouchbaseCluster(contextBucketName, contextBucketPassword);
services.AddSingleton<IContextDriver>(provider =>
{
var contextDriver = new CouchBaseDriver(ClusterHelper.GetBucket, contextBucketName);
return new TimedContextDriver(contextDriver, provider.GetService<IMetrics>());
});
>>>>>>>
services.InstallServiceAddons(Configuration);
services.Decorate<IContextDriver>((driver, provider) => new TimedContextDriver(driver, provider.GetService<IMetrics>()));
<<<<<<<
services.AddSingleton<IDiagnosticsProvider>(rulesDiagnostics);
services.AddSingleton<IDiagnosticsProvider>(new EnvironmentDiagnosticsProvider());
=======
var rulesDiagnostics = new RulesDriverStatusService(blobRulesDriver);
var couchbaseDiagnosticsProvider = new BucketConnectionIsAlive(ClusterHelper.GetBucket, contextBucketName);
var diagnosticsProviders = new IDiagnosticsProvider[] { rulesDiagnostics, couchbaseDiagnosticsProvider, new EnvironmentDiagnosticsProvider() };
services.AddSingleton<IEnumerable<IDiagnosticsProvider>>(diagnosticsProviders);
services.AddSingleton(GetRulesParser());
services.AddSingleton(provider =>
{
var parser = provider.GetService<IRuleParser>();
var rulesDriver = provider.GetService<IRulesDriver>();
return Task.Run(async () => await Engine.Tweek.Create(rulesDriver, parser)).Result;
});
>>>>>>>
services.AddSingleton<IDiagnosticsProvider>(new RulesDriverStatusService(blobRulesDriver));
services.AddSingleton<IDiagnosticsProvider>(new EnvironmentDiagnosticsProvider());
services.AddSingleton(GetRulesParser());
services.AddSingleton(provider =>
{
var parser = provider.GetService<IRuleParser>();
var rulesDriver = provider.GetService<IRulesDriver>();
return Task.Run(async () => await Engine.Tweek.Create(rulesDriver, parser)).Result;
});
<<<<<<<
services.AddSingleton(tweek);
services.AddSingleton(Authorization.CreateReadConfigurationAccessChecker(tweek));
services.AddSingleton(Authorization.CreateWriteContextAccessChecker(tweek));
services.AddSingleton(parser);
var tweekContactResolver = new TweekContractResolver.TweekContractResolver();
var jsonSerializer = new JsonSerializer() { ContractResolver = tweekContactResolver };
=======
var tweekContactResolver = new TweekContractResolver();
var jsonSerializer = new JsonSerializer { ContractResolver = tweekContactResolver };
>>>>>>>
var tweekContactResolver = new TweekContractResolver.TweekContractResolver();
var jsonSerializer = new JsonSerializer() { ContractResolver = tweekContactResolver }; |
<<<<<<<
typeof(RepeatBenchmark),
typeof(AppendPrependBenchmark),
typeof(ComparisonBenchmark),
typeof(ComparisonAsyncBenchmark)
=======
typeof(RepeatBenchmark)
#if (CURRENT)
,typeof(AppendPrependBenchmark)
#endif
>>>>>>>
typeof(RepeatBenchmark),
typeof(AppendPrependBenchmark),
typeof(ComparisonBenchmark),
typeof(ComparisonAsyncBenchmark)
#if (CURRENT)
,typeof(AppendPrependBenchmark)
#endif |
<<<<<<<
private readonly IFlubuCommandParser _parser;
=======
private readonly IFileWrapper _fileWrapper;
private readonly IBuildScriptLocator _buildScriptLocator;
>>>>>>>
private readonly IFlubuCommandParser _parser;
private readonly IFileWrapper _fileWrapper;
private readonly IBuildScriptLocator _buildScriptLocator;
<<<<<<<
IFlubuCommandParser parser,
=======
IFileWrapper fileWrapper,
IBuildScriptLocator buildScriptLocator,
>>>>>>>
IFlubuCommandParser parser,
IFileWrapper fileWrapper,
IBuildScriptLocator buildScriptLocator,
<<<<<<<
_parser = parser;
=======
_fileWrapper = fileWrapper;
_buildScriptLocator = buildScriptLocator;
>>>>>>>
_parser = parser;
_fileWrapper = fileWrapper;
_buildScriptLocator = buildScriptLocator;
<<<<<<<
var args = _parser.Parse(commandLine.Split(' ')
=======
var app = new CommandLineApplication(false);
IFlubuCommandParser parser = new FlubuCommandParser(app, null, _buildScriptLocator, _fileWrapper);
var args = parser.Parse(commandLine.Split(' ')
>>>>>>>
var args = _parser.Parse(commandLine.Split(' ')
<<<<<<<
var args = _parser.Parse(commandLine.Split(' ')
=======
var app = new CommandLineApplication(false);
IFlubuCommandParser parser = new FlubuCommandParser(app, null, _buildScriptLocator, _fileWrapper);
var args = parser.Parse(commandLine.Split(' ')
>>>>>>>
var args = _parser.Parse(commandLine.Split(' ') |
<<<<<<<
summRow.Clear(XLClearOptions.Contents);
summRow.Cell(groupClmn).Value = _getGroupLabel != null ? _getGroupLabel(title) : title + " Total";
=======
summRow.Clear(XLClearOptions.Contents | XLClearOptions.DataType); // ClosedXML issue 844
summRow.Cell(groupClmn).Value = _getGroupLabel != null ? _getGroupLabel(title) : title + " Итог";
>>>>>>>
summRow.Clear(XLClearOptions.Contents | XLClearOptions.DataType); // ClosedXML issue 844
summRow.Cell(groupClmn).Value = _getGroupLabel != null ? _getGroupLabel(title) : title + " Total"; |
<<<<<<<
{ "GeometryRotationAnchorOffset", (parser, x) => x.GeometryRotationAnchorOffset = parser.ParsePoint2Df() },
=======
{ "CamouflageDetectionMultiplier", (parser, x) => x.CamouflageDetectionMultiplier = parser.ParseFloat()},
>>>>>>>
{ "GeometryRotationAnchorOffset", (parser, x) => x.GeometryRotationAnchorOffset = parser.ParsePoint2Df() },
{ "CamouflageDetectionMultiplier", (parser, x) => x.CamouflageDetectionMultiplier = parser.ParseFloat()},
<<<<<<<
[AddedIn(SageGame.Bfme)]
public Point2Df GeometryRotationAnchorOffset { get; private set; }
=======
[AddedIn(SageGame.Bfme2)]
public float CamouflageDetectionMultiplier { get; private set; }
>>>>>>>
[AddedIn(SageGame.Bfme)]
public Point2Df GeometryRotationAnchorOffset { get; private set; }
[AddedIn(SageGame.Bfme2)]
public float CamouflageDetectionMultiplier { get; private set; } |
<<<<<<<
// Copyright (c) Microsoft Corporation and contributors. All Rights Reserved. See License.txt in the project root for license information.
using System;
=======
using System;
using System.IO;
>>>>>>>
// Copyright (c) Microsoft Corporation and contributors. All Rights Reserved. See License.txt in the project root for license information.
using System;
using System.IO; |
<<<<<<<
public IntPtr Data => THByteTensor_data (handle);
=======
public unsafe byte *Data => (byte*) THByteTensor_data (handle);
>>>>>>>
public IntPtr Data => THByteTensor_data (handle);
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
public IntPtr Data => THShortTensor_data (handle);
=======
public unsafe short *Data => (short*) THShortTensor_data (handle);
>>>>>>>
public IntPtr Data => THShortTensor_data (handle);
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
public IntPtr Data => THIntTensor_data (handle);
=======
public unsafe int *Data => (int*) THIntTensor_data (handle);
>>>>>>>
public IntPtr Data => THIntTensor_data (handle);
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
public IntPtr Data => THLongTensor_data (handle);
=======
public unsafe long *Data => (long*) THLongTensor_data (handle);
>>>>>>>
public IntPtr Data => THLongTensor_data (handle);
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
public IntPtr Data => THDoubleTensor_data (handle);
=======
public unsafe double *Data => (double*) THDoubleTensor_data (handle);
>>>>>>>
public IntPtr Data => THDoubleTensor_data (handle);
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
public IntPtr Data => THFloatTensor_data (handle);
=======
public unsafe float *Data => (float*) THFloatTensor_data (handle);
>>>>>>>
public IntPtr Data => THFloatTensor_data (handle);
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>> |
<<<<<<<
=======
public CCLens3D()
{
}
public CCLens3D(float duration, CCGridSize gridSize, CCPoint position, float radius) : base()
{
InitWithDuration(duration, gridSize, position, radius);
}
public CCLens3D(CCLens3D lens3D)
{
InitWithDuration(lens3D.m_fDuration, lens3D.m_sGridSize, lens3D.m_position, lens3D.m_fRadius);
}
>>>>>>>
<<<<<<<
=======
public bool InitWithDuration(float duration, CCGridSize gridSize, CCPoint position, float radius)
{
if (base.InitWithDuration(duration, gridSize))
{
m_position = new CCPoint(-1, -1);
m_positionInPixels = CCPoint.Zero;
>>>>>>> |
<<<<<<<
public int PlayEffect(int nId)
{
try
{
if (SharedList.ContainsKey(nId))
{
SharedList[nId].Play(false);
}
}
catch (Exception ex)
{
CCLog.Log("Unexpected exception while playing a SoundEffect: {0}", nId);
CCLog.Log(ex.ToString());
}
return (nId);
}
=======
public void PauseEffect(int fxid)
{
try
{
if (SharedList.ContainsKey(fxid))
{
SharedList[fxid].Pause();
}
}
catch (Exception ex)
{
CCLog.Log("Unexpected exception while pausing a SoundEffect: {0}", fxid);
CCLog.Log(ex.ToString());
}
}
public void StopAllEffects()
{
List<CCEffectPlayer> l = new List<CCEffectPlayer>();
lock (SharedList)
{
try
{
l.AddRange(SharedList.Values);
SharedList.Clear();
}
catch (Exception ex)
{
CCLog.Log("Unexpected exception while stopping all effects.");
CCLog.Log(ex.ToString());
}
}
foreach (CCEffectPlayer p in l)
{
p.Stop();
}
}
public int PlayEffect(int fxid)
{
PlayEffect(fxid, false);
return (fxid);
}
public int PlayEffect(int fxid, bool bLoop)
{
lock (SharedList)
{
try
{
if (SharedList.ContainsKey(fxid))
{
SharedList[fxid].Play(bLoop);
if (bLoop)
{
_LoopedSounds[fxid] = fxid;
}
}
}
catch (Exception ex)
{
CCLog.Log("Unexpected exception while playing a SoundEffect: {0}", fxid);
CCLog.Log(ex.ToString());
}
}
return fxid;
}
>>>>>>>
public void PauseEffect(int fxid)
{
try
{
if (SharedList.ContainsKey(fxid))
{
SharedList[fxid].Pause();
}
}
catch (Exception ex)
{
CCLog.Log("Unexpected exception while playing a SoundEffect: {0}", fxid);
CCLog.Log(ex.ToString());
}
}
public void StopAllEffects()
{
List<CCEffectPlayer> l = new List<CCEffectPlayer>();
lock (SharedList)
{
try
{
l.AddRange(SharedList.Values);
SharedList.Clear();
}
catch (Exception ex)
{
CCLog.Log("Unexpected exception while stopping all effects.");
CCLog.Log(ex.ToString());
}
}
foreach (CCEffectPlayer p in l)
{
p.Stop();
}
}
public int PlayEffect(int fxid)
{
PlayEffect(fxid, false);
return (fxid);
}
public int PlayEffect(int fxid, bool bLoop)
{
lock (SharedList)
{
try
{
if (SharedList.ContainsKey(fxid))
{
SharedList[fxid].Play(bLoop);
if (bLoop)
{
_LoopedSounds[fxid] = fxid;
}
}
}
catch (Exception ex)
{
CCLog.Log("Unexpected exception while playing a SoundEffect: {0}", fxid);
CCLog.Log(ex.ToString());
}
}
return fxid;
} |
<<<<<<<
var s = Scene.VisibleBoundsWorldspace.Size;
var p = new CCPoint(CCMacros.CCRandomBetween0And1() * s.Width, CCMacros.CCRandomBetween0And1() * s.Height);
label.Position = p;
=======
>>>>>>> |
<<<<<<<
public CCTransitionFlipX() { }
public CCTransitionFlipX(float t, CCScene s, tOrientation o) : base (t, s, o)
=======
public CCTransitionFlipX(float t, CCScene s, CCTransitionOrientation o) : base (t, s, o)
>>>>>>>
public CCTransitionFlipX() { }
public CCTransitionFlipX(float t, CCScene s, CCTransitionOrientation o) : base (t, s, o) |
<<<<<<<
protected override void UpdateColor()
=======
public override void UpdateColor()
>>>>>>>
public override void UpdateColor()
<<<<<<<
// public override void UpdateDisplayedColor(CCColor3B parentColor)
// {
// base.UpdateDisplayedColor(parentColor);
// UpdateColor();
// }
//
// protected internal override void UpdateDisplayedOpacity(byte parentOpacity)
// {
// base.UpdateDisplayedOpacity(parentOpacity);
// UpdateColor();
// }
=======
>>>>>>> |
<<<<<<<
CCSize s = Scene.VisibleBoundsWorldspace.Size;
=======
CCSize s = Director.WindowSizeInPoints;
>>>>>>>
CCSize s = Scene.VisibleBoundsWorldspace.Size;
<<<<<<<
CCSize s = Scene.VisibleBoundsWorldspace.Size;
=======
CCSize s = Director.WindowSizeInPoints;
>>>>>>>
CCSize s = Scene.VisibleBoundsWorldspace.Size;
<<<<<<<
var s = Scene.VisibleBoundsWorldspace.Size;
var layer1 = new CCLayerRGBA();
=======
var s = Director.WindowSizeInPoints;
var layer1 = new CCLayer();
>>>>>>>
var s = Scene.VisibleBoundsWorldspace.Size;
var layer1 = new CCLayer();
<<<<<<<
var s = Scene.VisibleBoundsWorldspace.Size;
=======
var s = Director.WindowSizeInPoints;
>>>>>>>
var s = Scene.VisibleBoundsWorldspace.Size;
<<<<<<<
var s = Scene.VisibleBoundsWorldspace.Size;
=======
var s = Director.WindowSizeInPoints;
>>>>>>>
var s = Scene.VisibleBoundsWorldspace.Size;
<<<<<<<
var s = Scene.VisibleBoundsWorldspace.Size;
var layer1 = new CCLayerRGBA();
=======
var s = Director.WindowSizeInPoints;
var layer1 = new CCLayer();
>>>>>>>
var s = Scene.VisibleBoundsWorldspace.Size;
var layer1 = new CCLayer();
<<<<<<<
var s = Scene.VisibleBoundsWorldspace.Size;
=======
var s = Director.WindowSizeInPoints;
>>>>>>>
var s = Scene.VisibleBoundsWorldspace.Size;
<<<<<<<
var s = Scene.VisibleBoundsWorldspace.Size;
=======
var s = Director.WindowSizeInPoints;
>>>>>>>
var s = Scene.VisibleBoundsWorldspace.Size; |
<<<<<<<
public static void SetScissorInPoints(float x, float y, float w, float h)
{
y = CCDirector.SharedDirector.WinSize.Height - y - h;
graphicsDevice.ScissorRectangle = new Rectangle(
(int)(x * m_fScaleX + m_obViewPortRect.Origin.X),
(int)(y * m_fScaleY + m_obViewPortRect.Origin.Y),
(int)(w * m_fScaleX),
(int)(h * m_fScaleY)
);
}
public static CCRect ScissorRect
{
get
{
var sr = graphicsDevice.ScissorRectangle;
float x = (sr.X - m_obViewPortRect.Origin.X) / m_fScaleX;
float y = (sr.Y - m_obViewPortRect.Origin.Y) / m_fScaleY;
float w = sr.Width / m_fScaleX;
float h = sr.Height / m_fScaleY;
y = CCDirector.SharedDirector.WinSize.Height - y - h;
return new CCRect(x, y, w, h);
}
}
public static void SetDesignResolutionSize(float width, float height, ResolutionPolicy resolutionPolicy)
=======
public static void SetDesignResolutionSize(float width, float height, CCResolutionPolicy resolutionPolicy)
>>>>>>>
public static void SetScissorInPoints(float x, float y, float w, float h)
{
y = CCDirector.SharedDirector.WinSize.Height - y - h;
graphicsDevice.ScissorRectangle = new Rectangle(
(int)(x * m_fScaleX + m_obViewPortRect.Origin.X),
(int)(y * m_fScaleY + m_obViewPortRect.Origin.Y),
(int)(w * m_fScaleX),
(int)(h * m_fScaleY)
);
}
public static CCRect ScissorRect
{
get
{
var sr = graphicsDevice.ScissorRectangle;
float x = (sr.X - m_obViewPortRect.Origin.X) / m_fScaleX;
float y = (sr.Y - m_obViewPortRect.Origin.Y) / m_fScaleY;
float w = sr.Width / m_fScaleX;
float h = sr.Height / m_fScaleY;
y = CCDirector.SharedDirector.WinSize.Height - y - h;
return new CCRect(x, y, w, h);
}
}
public static void SetDesignResolutionSize(float width, float height, CCResolutionPolicy resolutionPolicy) |
<<<<<<<
CCRenderTexture texture = new CCRenderTexture(bounds.Size, viewportRect.Size);
texture.Sprite.AnchorPoint = new CCPoint(0.5f, 0.5f);
texture.Position = new CCPoint(bounds.Origin.X + bounds.Size.Width / 2, bounds.Size.Height / 2);
texture.AnchorPoint = new CCPoint(0.5f, 0.5f);
=======
CCRenderTexture texture = new CCRenderTexture((int) size.Width, (int) size.Height, Director.ContentScaleFactor);
texture.Sprite.AnchorPoint = CCPoint.AnchorMiddle;
texture.Position = size.Center;
texture.AnchorPoint = CCPoint.AnchorMiddle;
>>>>>>>
CCRenderTexture texture = new CCRenderTexture(bounds.Size, viewportRect.Size);
texture.Sprite.AnchorPoint = CCPoint.AnchorMiddle;
texture.Position = new CCPoint(bounds.Origin.X + bounds.Size.Width / 2, bounds.Size.Height / 2);
texture.AnchorPoint = CCPoint.AnchorMiddle;
<<<<<<<
node.Position = new CCPoint(bounds.Origin.X + bounds.Size.Width / 2, bounds.Size.Height / 2);
node.AnchorPoint = new CCPoint(0.5f, 0.5f);
=======
node.Position = size.Center;
node.AnchorPoint = CCPoint.AnchorMiddle;
>>>>>>>
node.Position = new CCPoint(bounds.Origin.X + bounds.Size.Width / 2, bounds.Size.Height / 2);
node.AnchorPoint = CCPoint.AnchorMiddle;
<<<<<<<
node.Position = new CCPoint(bounds.Origin.X + bounds.Size.Width / 2, bounds.Size.Height / 2);
node.AnchorPoint = new CCPoint(0.5f, 0.5f);
=======
node.Position = size.Center;
node.AnchorPoint = CCPoint.AnchorMiddle;
>>>>>>>
node.Position = new CCPoint(bounds.Origin.X + bounds.Size.Width / 2, bounds.Size.Height / 2);
node.AnchorPoint = CCPoint.AnchorMiddle;
<<<<<<<
node.Position = new CCPoint(bounds.Origin.X + bounds.Size.Width / 2, bounds.Size.Height / 2);
node.AnchorPoint = new CCPoint(0.5f, 0.5f);
=======
node.Position = size.Center;
node.AnchorPoint = CCPoint.AnchorMiddle;
>>>>>>>
node.Position = new CCPoint(bounds.Origin.X + bounds.Size.Width / 2, bounds.Size.Height / 2);
node.AnchorPoint = CCPoint.AnchorMiddle;
<<<<<<<
node.Position = new CCPoint(bounds.Origin.X + bounds.Size.Width / 2, bounds.Size.Height / 2);
node.AnchorPoint = new CCPoint(0.5f, 0.5f);
=======
node.Position = size.Center;
node.AnchorPoint = CCPoint.AnchorMiddle;
>>>>>>>
node.Position = new CCPoint(bounds.Origin.X + bounds.Size.Width / 2, bounds.Size.Height / 2);
node.AnchorPoint = CCPoint.AnchorMiddle;
<<<<<<<
node.Position = new CCPoint(bounds.Origin.X + bounds.Size.Width / 2, bounds.Size.Height / 2);
node.AnchorPoint = new CCPoint(0.5f, 0.5f);
=======
node.Position = size.Center;
node.AnchorPoint = CCPoint.AnchorMiddle;
>>>>>>>
node.Position = new CCPoint(bounds.Origin.X + bounds.Size.Width / 2, bounds.Size.Height / 2);
node.AnchorPoint = CCPoint.AnchorMiddle;
<<<<<<<
node.Position = new CCPoint(bounds.Origin.X + bounds.Size.Width / 2, bounds.Size.Height / 2);
node.AnchorPoint = new CCPoint(0.5f, 0.5f);
=======
node.Position = size.Center;
node.AnchorPoint = CCPoint.AnchorMiddle;
>>>>>>>
node.Position = new CCPoint(bounds.Origin.X + bounds.Size.Width / 2, bounds.Size.Height / 2);
node.AnchorPoint = CCPoint.AnchorMiddle; |
<<<<<<<
The most popular CCNodes are: CCScene, CCLayer, CCSprite, CCMenu.
The main features of a CCNode are:
- They can contain other CCNode nodes (addChild, getChildByTag, removeChild, etc)
- They can schedule periodic callback (schedule, unschedule, etc)
- They can execute actions (runAction, stopAction, etc)
Some CCNode nodes provide extra functionality for them or their children.
Subclassing a CCNode usually means (one/all) of:
- overriding init to initialize resources and schedule callbacks
- create callbacks to handle the advancement of time
- overriding draw to render the node
Features of CCNode:
- position
- scale (x, y)
- rotation (in degrees, clockwise)
- CCCamera (an interface to gluLookAt )
- CCGridBase (to do mesh transformations)
- anchor point
- size
- visible
- z-order
- openGL z position
Default values:
- rotation: 0
- position: (x=0,y=0)
- scale: (x=1,y=1)
- contentSize: (x=0,y=0)
- anchorPoint: (x=0,y=0)
Limitations:
- A CCNode is a "void" object. It doesn't have a texture
Order in transformations with grid disabled
-# The node will be translated (position)
-# The node will be rotated (rotation)
-# The node will be scaled (scale)
-# The node will be moved according to the camera values (camera)
Order in transformations with grid enabled
-# The node will be translated (position)
-# The node will be rotated (rotation)
-# The node will be scaled (scale)
-# The grid will capture the screen
-# The node will be moved according to the camera values (camera)
-# The grid will render the captured screen
Camera:
- Each node has a camera. By default it points to the center of the CCNode.
*/
=======
The most popular CCNodes are: CCScene, CCLayer, CCSprite, CCMenu.
The main features of a CCNode are:
- They can contain other CCNode nodes (addChild, getChildByTag, removeChild, etc)
- They can schedule periodic callback (schedule, unschedule, etc)
- They can execute actions (runAction, stopAction, etc)
- They can listen to and dispatch events (graph priority, fixed priority, custom)
Some CCNode nodes provide extra functionality for them or their children.
Subclassing a CCNode usually means (one/all) of:
- overriding init to initialize resources and schedule callbacks
- create callbacks to handle the advancement of time
- overriding draw to render the node
Features of CCNode:
- position
- scale (x, y)
- rotation (in degrees, clockwise)
- CCCamera (an interface to gluLookAt )
- CCGridBase (to do mesh transformations)
- anchor point
- size
- visible
- z-order
- openGL z position
Default values:
- rotation: 0
- position: (x=0,y=0)
- scale: (x=1,y=1)
- contentSize: (x=0,y=0)
- anchorPoint: (x=0,y=0)
Limitations:
- A CCNode is a "void" object. It doesn't have a texture
Order in transformations with grid disabled
-# The node will be translated (position)
-# The node will be rotated (rotation)
-# The node will be scaled (scale)
-# The node will be moved according to the camera values (camera)
Order in transformations with grid enabled
-# The node will be translated (position)
-# The node will be rotated (rotation)
-# The node will be scaled (scale)
-# The grid will capture the screen
-# The node will be moved according to the camera values (camera)
-# The grid will render the captured screen
Camera:
- Each node has a camera. By default it points to the center of the CCNode.
*/
>>>>>>>
The most popular CCNodes are: CCScene, CCLayer, CCSprite, CCMenu.
The main features of a CCNode are:
- They can contain other CCNode nodes (addChild, getChildByTag, removeChild, etc)
- They can schedule periodic callback (schedule, unschedule, etc)
- They can execute actions (runAction, stopAction, etc)
Some CCNode nodes provide extra functionality for them or their children.
Subclassing a CCNode usually means (one/all) of:
- overriding init to initialize resources and schedule callbacks
- create callbacks to handle the advancement of time
- overriding draw to render the node
Features of CCNode:
- position
- scale (x, y)
- rotation (in degrees, clockwise)
- CCCamera (an interface to gluLookAt )
- CCGridBase (to do mesh transformations)
- anchor point
- size
- visible
- z-order
- openGL z position
Default values:
- rotation: 0
- position: (x=0,y=0)
- scale: (x=1,y=1)
- contentSize: (x=0,y=0)
- anchorPoint: (x=0,y=0)
Limitations:
- A CCNode is a "void" object. It doesn't have a texture
Order in transformations with grid disabled
-# The node will be translated (position)
-# The node will be rotated (rotation)
-# The node will be scaled (scale)
-# The node will be moved according to the camera values (camera)
Order in transformations with grid enabled
-# The node will be translated (position)
-# The node will be rotated (rotation)
-# The node will be scaled (scale)
-# The grid will capture the screen
-# The node will be moved according to the camera values (camera)
-# The grid will render the captured screen
Camera:
- Each node has a camera. By default it points to the center of the CCNode.
*/
<<<<<<<
CCScene scene;
CCAffineTransform affineLocalTransform;
CCAffineTransform additionalTransform;
=======
// opacity controls
byte displayedOpacity;
CCColor3B displayedColor;
>>>>>>>
CCScene scene;
CCAffineTransform affineLocalTransform;
CCAffineTransform additionalTransform;
List<CCEventListener> toBeAddedListeners; // The listeners to be added lazily when a EventDispatcher is not yet available
<<<<<<<
// Manually implemented properties
=======
List<CCEventListener> toBeAddedListeners; // The listeners to be added lazily when a EventDispatcher is not yet available
// Not auto-implemented properties
>>>>>>>
// Manually implemented properties
<<<<<<<
=======
// color and opacity
displayedOpacity = 255;
RealOpacity = 255;
displayedColor = CCColor3B.White;
RealColor = CCColor3B.White;
IsColorCascaded = false;
IsOpacityCascaded = false;
// ---------
director = CCApplication.SharedApplication.MainWindowDirector;
forceDirectorSet = true;
>>>>>>>
IsColorCascaded = false;
IsOpacityCascaded = false;
displayedOpacity = 255;
RealOpacity = 255;
displayedColor = CCColor3B.White;
RealColor = CCColor3B.White;
<<<<<<<
=======
public void Transform()
{
CCDrawManager.MultMatrix(NodeToParentTransform(), VertexZ);
// XXX: Expensive calls. Camera should be integrated into the cached affine matrix
if (camera != null && !(Grid != null && Grid.Active))
{
bool translate = (anchorPointInPoints.X != 0.0f || anchorPointInPoints.Y != 0.0f);
if (translate)
{
CCDrawManager.Translate(anchorPointInPoints.X, anchorPointInPoints.Y, 0);
}
camera.Locate();
if (translate)
{
CCDrawManager.Translate(-anchorPointInPoints.X, -anchorPointInPoints.Y, 0);
}
}
}
#region Color and Opacity
protected CCColor3B RealColor { get; set; }
protected byte RealOpacity { get; set; }
public virtual byte Opacity
{
get { return RealOpacity; }
set
{
displayedOpacity = RealOpacity = value;
UpdateCascadeOpacity();
}
}
public byte DisplayedOpacity
{
get { return displayedOpacity; }
protected set
{
displayedOpacity = value;
}
}
protected internal virtual void UpdateDisplayedOpacity(byte parentOpacity)
{
displayedOpacity = (byte) (RealOpacity * parentOpacity / 255.0f);
UpdateColor();
if (IsOpacityCascaded && Children != null)
{
foreach(CCNode node in Children)
{
node.UpdateDisplayedOpacity(DisplayedOpacity);
}
}
}
protected internal virtual void UpdateCascadeOpacity ()
{
byte parentOpacity = 255;
var pParent = Parent;
if (pParent != null && pParent.IsOpacityCascaded)
{
parentOpacity = pParent.DisplayedOpacity;
}
UpdateDisplayedOpacity(parentOpacity);
}
protected virtual void DisableCascadeOpacity()
{
DisplayedOpacity = RealOpacity;
foreach(CCNode node in Children.Elements)
{
node.UpdateDisplayedOpacity(255);
}
}
bool isOpacityCascaded;
public virtual bool IsOpacityCascaded
{
get { return isOpacityCascaded; }
set
{
if (isOpacityCascaded == value)
return;
isOpacityCascaded = value;
if (isOpacityCascaded)
{
UpdateCascadeOpacity();
}
else
{
DisableCascadeOpacity();
}
}
}
protected virtual void UpdateColor()
{
// Override the opdate of color here
}
public CCColor3B DisplayedColor
{
get { return displayedColor; }
protected set
{
displayedColor = value;
}
}
public virtual CCColor3B Color
{
get { return RealColor; }
set
{
displayedColor = RealColor = value;
UpdateCascadeColor();
}
}
public virtual void UpdateDisplayedColor(CCColor3B parentColor)
{
displayedColor.R = (byte)(RealColor.R * parentColor.R / 255.0f);
displayedColor.G = (byte)(RealColor.G * parentColor.G / 255.0f);
displayedColor.B = (byte)(RealColor.B * parentColor.B / 255.0f);
UpdateColor();
if (IsColorCascaded)
{
if (IsOpacityCascaded && Children != null)
{
foreach(CCNode node in Children)
{
if (node != null)
{
node.UpdateDisplayedColor(DisplayedColor);
}
}
}
}
}
bool isColorCascaded;
public virtual bool IsColorCascaded
{
get { return isColorCascaded; }
set
{
if (isColorCascaded == value)
return;
isColorCascaded = value;
if (isColorCascaded)
{
UpdateCascadeColor();
}
else
{
DisableCascadeColor();
}
}
}
protected internal void UpdateCascadeColor()
{
var parentColor = CCColor3B.White;
if (Parent != null && Parent.IsColorCascaded)
{
parentColor = Parent.DisplayedColor;
}
UpdateDisplayedColor(parentColor);
}
protected internal void DisableCascadeColor()
{
if (Children == null)
return;
foreach (var child in Children)
{
child.UpdateDisplayedColor(CCColor3B.White);
}
}
public virtual bool IsColorModifiedByOpacity
{
get { return false; }
set { }
}
#endregion Color and Opacity
>>>>>>>
#region Color and Opacity
protected internal virtual void UpdateDisplayedOpacity(byte parentOpacity)
{
displayedOpacity = (byte) (RealOpacity * parentOpacity / 255.0f);
UpdateColor();
if (IsOpacityCascaded && Children != null)
{
foreach(CCNode node in Children)
{
node.UpdateDisplayedOpacity(DisplayedOpacity);
}
}
}
protected internal virtual void UpdateCascadeOpacity ()
{
byte parentOpacity = 255;
var pParent = Parent;
if (pParent != null && pParent.IsOpacityCascaded)
{
parentOpacity = pParent.DisplayedOpacity;
}
UpdateDisplayedOpacity(parentOpacity);
}
protected virtual void DisableCascadeOpacity()
{
DisplayedOpacity = RealOpacity;
foreach(CCNode node in Children.Elements)
{
node.UpdateDisplayedOpacity(255);
}
}
protected virtual void UpdateColor()
{
// Override the opdate of color here
}
public virtual void UpdateDisplayedColor(CCColor3B parentColor)
{
displayedColor.R = (byte)(RealColor.R * parentColor.R / 255.0f);
displayedColor.G = (byte)(RealColor.G * parentColor.G / 255.0f);
displayedColor.B = (byte)(RealColor.B * parentColor.B / 255.0f);
UpdateColor();
if (IsColorCascaded)
{
if (IsOpacityCascaded && Children != null)
{
foreach(CCNode node in Children)
{
if (node != null)
{
node.UpdateDisplayedColor(DisplayedColor);
}
}
}
}
}
protected internal void UpdateCascadeColor()
{
var parentColor = CCColor3B.White;
if (Parent != null && Parent.IsColorCascaded)
{
parentColor = Parent.DisplayedColor;
}
UpdateDisplayedColor(parentColor);
}
protected internal void DisableCascadeColor()
{
if (Children == null)
return;
foreach (var child in Children)
{
child.UpdateDisplayedColor(CCColor3B.White);
}
}
#endregion Color and Opacity
<<<<<<<
#endregion Transformations
public virtual void KeyBackClicked()
{
}
public virtual void KeyMenuClicked()
{
}
=======
#endregion ConvertToSpace
>>>>>>>
#endregion Transformations
public virtual void KeyBackClicked()
{
}
public virtual void KeyMenuClicked()
{
} |
<<<<<<<
public bool InitWithTarget(SEL_MenuHandler selector, CCMenuItem[] items)
=======
#region ICCRGBAProtocol Members
public byte Opacity
{
get { return m_cOpacity; }
set
{
m_cOpacity = value;
if (m_pSubItems != null && m_pSubItems.Count > 0)
{
for (int i = 0; i < m_pSubItems.Count; i++)
{
var rgba = m_pSubItems[i] as ICCRGBAProtocol;
if (rgba != null)
{
rgba.Opacity = value;
}
}
}
}
}
public CCColor3B Color
{
get { return m_tColor; }
set
{
m_tColor = value;
if (m_pSubItems != null && m_pSubItems.Count > 0)
{
for (int i = 0; i < m_pSubItems.Count; i++)
{
var rgba = m_pSubItems[i] as ICCRGBAProtocol;
if (rgba != null)
{
rgba.Color = value;
}
}
}
}
}
public bool IsOpacityModifyRGB
{
get { throw new NotImplementedException(); }
set { throw new NotImplementedException(); }
}
#endregion
public bool InitWithTarget(Action<object> selector, CCMenuItem[] items)
>>>>>>>
public bool InitWithTarget(Action<object> selector, CCMenuItem[] items) |
<<<<<<<
CCSize s = Scene.VisibleBoundsWorldspace.Size;
=======
>>>>>>> |
<<<<<<<
CCRect cachedViewportRect;
CCRect cachedVisibleBoundsRect;
=======
>>>>>>> |
<<<<<<<
#if WINDOWS || WINDOWSGL || MONOMAC || IOS
=======
//#if WINDOWS || WINDOWSGL_PHONE
>>>>>>>
//#if WINDOWS || WINDOWSGL || MONOMAC || IOS
<<<<<<<
#elif !NETFX_CORE && !WINDOWS_PHONE
var inGZipStream = new GZipStream(new MemoryStream(pTMXMapInfo.CurrentString), CompressionMode.Decompress);
#else
var inGZipStream = new GZipStream(new MemoryStream(pTMXMapInfo.CurrentString));
#endif
=======
//#elif !XBOX
// var inGZipStream = new GZipStream(new MemoryStream(pTMXMapInfo.CurrentString), CompressionMode.Decompress);
//#else
// var inGZipStream = new GZipInputStream(new MemoryStream(pTMXMapInfo.CurrentString));
//#endif
>>>>>>>
//#elif !XBOX
// var inGZipStream = new GZipStream(new MemoryStream(pTMXMapInfo.CurrentString), CompressionMode.Decompress);
//#else
// var inGZipStream = new GZipInputStream(new MemoryStream(pTMXMapInfo.CurrentString));
//#endif |
<<<<<<<
// public static b2ContactVelocityConstraint Default = b2ContactVelocityConstraint.Create();
=======
>>>>>>>
<<<<<<<
// public static b2ContactPositionConstraint Default = b2ContactPositionConstraint.Create();
=======
>>>>>>>
public static b2ContactPositionConstraint Default = b2ContactPositionConstraint.Create(); |
<<<<<<<
[Conditional("DEBUG")]
void ValidateInvariants()
{
var line = this;
int lineStartOffset = line.DocumentLine.Offset;
int lineEndOffset = line.DocumentLine.EndOffset;
for (int i = 0; i < line.Sections.Count; i++) {
HighlightedSection s1 = line.Sections[i];
if (s1.Offset < lineStartOffset || s1.Length < 0 || s1.Offset + s1.Length > lineEndOffset)
throw new InvalidOperationException("Section is outside line bounds");
for (int j = i + 1; j < line.Sections.Count; j++) {
HighlightedSection s2 = line.Sections[j];
if (s2.Offset >= s1.Offset + s1.Length) {
// s2 is after s1
} else if (s2.Offset >= s1.Offset && s2.Offset + s2.Length <= s1.Offset + s1.Length) {
// s2 is nested within s1
} else {
throw new InvalidOperationException("Sections are overlapping or incorrectly sorted.");
}
}
}
}
#region Merge
/// <summary>
/// Merges the additional line into this line.
/// </summary>
public void MergeWith(HighlightedLine additionalLine)
{
if (additionalLine == null)
return;
ValidateInvariants();
additionalLine.ValidateInvariants();
int pos = 0;
Stack<int> activeSectionEndOffsets = new Stack<int>();
int lineEndOffset = this.DocumentLine.EndOffset;
activeSectionEndOffsets.Push(lineEndOffset);
foreach (HighlightedSection newSection in additionalLine.Sections) {
int newSectionStart = newSection.Offset;
// Track the existing sections using the stack, up to the point where
// we need to insert the first part of the newSection
while (pos < this.Sections.Count) {
HighlightedSection s = this.Sections[pos];
if (newSection.Offset < s.Offset)
break;
while (s.Offset > activeSectionEndOffsets.Peek()) {
activeSectionEndOffsets.Pop();
}
activeSectionEndOffsets.Push(s.Offset + s.Length);
pos++;
}
// Now insert the new section
// Create a copy of the stack so that we can track the sections we traverse
// during the insertion process:
Stack<int> insertionStack = new Stack<int>(activeSectionEndOffsets.Reverse());
// The stack enumerator reverses the order of the elements, so we call Reverse() to restore
// the original order.
int i;
for (i = pos; i < this.Sections.Count; i++) {
HighlightedSection s = this.Sections[i];
if (newSection.Offset + newSection.Length <= s.Offset)
break;
// Insert a segment in front of s:
Insert(ref i, ref newSectionStart, s.Offset, newSection.Color, insertionStack);
while (s.Offset > insertionStack.Peek()) {
insertionStack.Pop();
}
insertionStack.Push(s.Offset + s.Length);
}
Insert(ref i, ref newSectionStart, newSection.Offset + newSection.Length, newSection.Color, insertionStack);
}
ValidateInvariants();
}
void Insert(ref int pos, ref int newSectionStart, int insertionEndPos, HighlightingColor color, Stack<int> insertionStack)
{
if (newSectionStart >= insertionEndPos) {
// nothing to insert here
return;
}
while (insertionStack.Peek() <= newSectionStart) {
insertionStack.Pop();
}
while (insertionStack.Peek() < insertionEndPos) {
int end = insertionStack.Pop();
// insert the portion from newSectionStart to end
if (end > newSectionStart) {
this.Sections.Insert(pos++, new HighlightedSection {
Offset = newSectionStart,
Length = end - newSectionStart,
Color = color
});
newSectionStart = end;
}
}
if (insertionEndPos > newSectionStart) {
this.Sections.Insert(pos++, new HighlightedSection {
Offset = newSectionStart,
Length = insertionEndPos - newSectionStart,
Color = color
});
newSectionStart = insertionEndPos;
}
}
#endregion
=======
/// <summary>
/// Gets the default color of all text outside a <see cref="HighlightedSection"/>.
/// </summary>
public HighlightingColor DefaultTextColor { get; set; }
>>>>>>>
/// <summary>
/// Gets the default color of all text outside a <see cref="HighlightedSection"/>.
/// </summary>
public HighlightingColor DefaultTextColor { get; set; }
[Conditional("DEBUG")]
void ValidateInvariants()
{
var line = this;
int lineStartOffset = line.DocumentLine.Offset;
int lineEndOffset = line.DocumentLine.EndOffset;
for (int i = 0; i < line.Sections.Count; i++) {
HighlightedSection s1 = line.Sections[i];
if (s1.Offset < lineStartOffset || s1.Length < 0 || s1.Offset + s1.Length > lineEndOffset)
throw new InvalidOperationException("Section is outside line bounds");
for (int j = i + 1; j < line.Sections.Count; j++) {
HighlightedSection s2 = line.Sections[j];
if (s2.Offset >= s1.Offset + s1.Length) {
// s2 is after s1
} else if (s2.Offset >= s1.Offset && s2.Offset + s2.Length <= s1.Offset + s1.Length) {
// s2 is nested within s1
} else {
throw new InvalidOperationException("Sections are overlapping or incorrectly sorted.");
}
}
}
}
#region Merge
/// <summary>
/// Merges the additional line into this line.
/// </summary>
public void MergeWith(HighlightedLine additionalLine)
{
if (additionalLine == null)
return;
ValidateInvariants();
additionalLine.ValidateInvariants();
int pos = 0;
Stack<int> activeSectionEndOffsets = new Stack<int>();
int lineEndOffset = this.DocumentLine.EndOffset;
activeSectionEndOffsets.Push(lineEndOffset);
foreach (HighlightedSection newSection in additionalLine.Sections) {
int newSectionStart = newSection.Offset;
// Track the existing sections using the stack, up to the point where
// we need to insert the first part of the newSection
while (pos < this.Sections.Count) {
HighlightedSection s = this.Sections[pos];
if (newSection.Offset < s.Offset)
break;
while (s.Offset > activeSectionEndOffsets.Peek()) {
activeSectionEndOffsets.Pop();
}
activeSectionEndOffsets.Push(s.Offset + s.Length);
pos++;
}
// Now insert the new section
// Create a copy of the stack so that we can track the sections we traverse
// during the insertion process:
Stack<int> insertionStack = new Stack<int>(activeSectionEndOffsets.Reverse());
// The stack enumerator reverses the order of the elements, so we call Reverse() to restore
// the original order.
int i;
for (i = pos; i < this.Sections.Count; i++) {
HighlightedSection s = this.Sections[i];
if (newSection.Offset + newSection.Length <= s.Offset)
break;
// Insert a segment in front of s:
Insert(ref i, ref newSectionStart, s.Offset, newSection.Color, insertionStack);
while (s.Offset > insertionStack.Peek()) {
insertionStack.Pop();
}
insertionStack.Push(s.Offset + s.Length);
}
Insert(ref i, ref newSectionStart, newSection.Offset + newSection.Length, newSection.Color, insertionStack);
}
ValidateInvariants();
}
void Insert(ref int pos, ref int newSectionStart, int insertionEndPos, HighlightingColor color, Stack<int> insertionStack)
{
if (newSectionStart >= insertionEndPos) {
// nothing to insert here
return;
}
while (insertionStack.Peek() <= newSectionStart) {
insertionStack.Pop();
}
while (insertionStack.Peek() < insertionEndPos) {
int end = insertionStack.Pop();
// insert the portion from newSectionStart to end
if (end > newSectionStart) {
this.Sections.Insert(pos++, new HighlightedSection {
Offset = newSectionStart,
Length = end - newSectionStart,
Color = color
});
newSectionStart = end;
}
}
if (insertionEndPos > newSectionStart) {
this.Sections.Insert(pos++, new HighlightedSection {
Offset = newSectionStart,
Length = insertionEndPos - newSectionStart,
Color = color
});
newSectionStart = insertionEndPos;
}
}
#endregion |
<<<<<<<
using ICSharpCode.NRefactory.Editor;
=======
using ICSharpCode.AvalonEdit.Utils;
>>>>>>>
using ICSharpCode.AvalonEdit.Utils;
using ICSharpCode.NRefactory.Editor; |
<<<<<<<
if (other.NodeType != NodeType.IdToken)
=======
if (!typeof(Token).IsAssignableFrom(other.GetType()))
>>>>>>>
if (!typeof(Token).IsAssignableFrom(other.GetType()))
<<<<<<<
var regex = other.Root.Language.IsCaseInsensitive()
? CaseInsensitiveRegex
: Regex;
MatchedLocations = PatternHelper.MatchRegex(regex, ((IdToken)other).Id, true);
=======
MatchedLocations = PatternHelper.MatchRegex(Regex, ((Token)other).TextValue, true);
>>>>>>>
var regex = other.Root.Language.IsCaseInsensitive()
? CaseInsensitiveRegex
: Regex;
MatchedLocations = PatternHelper.MatchRegex(regex, ((Token)other).TextValue, true); |
<<<<<<<
using System.Collections.Generic;
using System.Linq;
=======
using System.Linq;
using System.Collections.Generic;
using System;
>>>>>>>
using System;
using System.Collections.Generic;
using System.Linq; |
<<<<<<<
return new StringLiteral(charLiteral.GetText(), textSpan);
=======
string text = charLiteral.GetText();
return new StringLiteral(text.Substring(1, text.Length - 2), textSpan, FileNode);
>>>>>>>
string text = charLiteral.GetText();
return new StringLiteral(text.Substring(1, text.Length - 2), textSpan); |
<<<<<<<
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));
=======
>>>>>>> |
<<<<<<<
Flag = true,
Enum = TestEnum.Value1,
Owned = null
=======
Composition = null
>>>>>>>
Flag = true,
Enum = TestEnum.Value1,
Owned = null
Composition = null
<<<<<<<
public bool Flag { get; set; }
public TestEnum Enum { get; set; }
public OwnedDTO Owned { get; set; }
=======
public CompositionDTO Composition { get; set; }
>>>>>>>
public bool Flag { get; set; }
public TestEnum Enum { get; set; }
public OwnedDTO Owned { get; set; }
public CompositionDTO Composition { get; set; } |
<<<<<<<
using Paramore.Brighter.FeatureSwitch;
=======
using Polly.Fallback;
>>>>>>>
using Paramore.Brighter.FeatureSwitch;
using Polly.Fallback;
<<<<<<<
private IAmAFeatureSwitchRegistry _featureSwitchRegistry;
=======
private IAmAChannelFactory _responseChannelFactory;
>>>>>>>
private IAmAFeatureSwitchRegistry _featureSwitchRegistry;
private IAmAChannelFactory _responseChannelFactory;
<<<<<<<
/// <summary>
///
/// </summary>
/// <param name="featureSwitchRegistry"></param>
/// <returns></returns>
INeedARequestContext ConfigureFeatureSwitches(IAmAFeatureSwitchRegistry featureSwitchRegistry);
=======
>>>>>>>
/// <summary>
///
/// </summary>
/// <param name="featureSwitchRegistry"></param>
/// <returns></returns>
INeedARequestContext ConfigureFeatureSwitches(IAmAFeatureSwitchRegistry featureSwitchRegistry); |
<<<<<<<
using MediaBrowser.Model.LiveTv;
using MediaBrowser.Model.Logging;
=======
using MediaBrowser.Model.Library;
>>>>>>>
using MediaBrowser.Model.Library;
using MediaBrowser.Model.LiveTv;
using MediaBrowser.Model.Logging;
<<<<<<<
public static async Task<TReturnType> Clone<TReturnType>(this TReturnType item)
{
#if WP8
var json = await JsonConvert.SerializeObjectAsync(item);
return await JsonConvert.DeserializeObjectAsync<TReturnType>(json);
#else
await TaskEx.Run(() =>
{
var json = JsonConvert.SerializeObject(item);
return JsonConvert.DeserializeObject<TReturnType>(json);
});
return item;
#endif
}
internal static string CoolDateName(DateTime dateTime)
{
var theDate = dateTime.Date;
var today = DateTime.Now.Date;
if (theDate == today)
{
return AppResources.LabelScheduleToday;
}
return theDate == today.AddDays(1) ? AppResources.LabelScheduleTomorrow : theDate.ToLongDateString();
}
=======
internal static string CoolDateName(DateTime? dateTime)
{
if (!dateTime.HasValue)
{
return string.Empty;
}
var theDate = dateTime.Value.Date;
var today = DateTime.Now.Date;
if (theDate == today)
{
return AppResources.LabelScheduleToday;
}
return theDate == today.AddDays(1) ? AppResources.LabelScheduleTomorrow : theDate.ToLongDateString();
}
>>>>>>>
public static async Task<TReturnType> Clone<TReturnType>(this TReturnType item)
{
#if WP8
var json = await JsonConvert.SerializeObjectAsync(item);
return await JsonConvert.DeserializeObjectAsync<TReturnType>(json);
#else
await TaskEx.Run(() =>
{
var json = JsonConvert.SerializeObject(item);
return JsonConvert.DeserializeObject<TReturnType>(json);
});
return item;
#endif
}
internal static string CoolDateName(DateTime? dateTime)
{
if (!dateTime.HasValue)
{
return string.Empty;
}
var theDate = dateTime.Value.Date;
var today = DateTime.Now.Date;
if (theDate == today)
{
return AppResources.LabelScheduleToday;
}
return theDate == today.AddDays(1) ? AppResources.LabelScheduleTomorrow : theDate.ToLongDateString();
} |
<<<<<<<
=======
using Cimbalino.Phone.Toolkit.Services;
using GalaSoft.MvvmLight.Ioc;
using MediaBrowser.ApiInteraction;
using MediaBrowser.ApiInteraction.WebSocket;
>>>>>>>
using Cimbalino.Phone.Toolkit.Services;
using GalaSoft.MvvmLight.Ioc;
<<<<<<<
using INavigationService = MediaBrowser.WindowsPhone.Model.Interfaces.INavigationService;
=======
using INavigationService = MediaBrowser.WindowsPhone.Model.INavigationService;
using LockScreenService = MediaBrowser.WindowsPhone.Services.LockScreenService;
>>>>>>>
using INavigationService = MediaBrowser.WindowsPhone.Model.Interfaces.INavigationService;
using LockScreenService = MediaBrowser.WindowsPhone.Services.LockScreenService;
<<<<<<<
apiClient.OpenWebSocket(() => new WebSocketClient());
=======
if (string.IsNullOrEmpty(App.Settings.ConnectionDetails.ServerId))
{
App.Settings.ConnectionDetails.ServerId = sysInfo.Id;
var appSettings = SimpleIoc.Default.GetInstance<IApplicationSettingsService>();
appSettings.Set(Constants.Settings.ConnectionSettings, App.Settings.ConnectionDetails);
appSettings.Save();
}
logger.Info("Checking if live TV is supported");
var liveTv = await apiClient.GetLiveTvInfoAsync();
App.Settings.LiveTvInfo = liveTv;
if (SimpleIoc.Default.IsRegistered<ApiWebSocket>())
{
SimpleIoc.Default.Unregister<ApiWebSocket>();
}
App.WebSocketClient = await ApiWebSocket.Create((ApiClient)apiClient, () => new WebSocketClient(), default(CancellationToken));
>>>>>>>
apiClient.OpenWebSocket(() => new WebSocketClient());
if (string.IsNullOrEmpty(App.Settings.ConnectionDetails.ServerId))
{
App.Settings.ConnectionDetails.ServerId = sysInfo.Id;
var appSettings = SimpleIoc.Default.GetInstance<IApplicationSettingsService>();
appSettings.Set(Constants.Settings.ConnectionSettings, App.Settings.ConnectionDetails);
appSettings.Save();
}
logger.Info("Checking if live TV is supported"); |
<<<<<<<
using MediaBrowser.ApiInteraction.Data;
using MediaBrowser.ApiInteraction.Playback;
=======
>>>>>>>
using MediaBrowser.ApiInteraction.Data;
using MediaBrowser.ApiInteraction.Playback;
<<<<<<<
private StreamInfo _streamInfo;
=======
private StreamInfo _streamInfo;
public TimeSpan _startFrom;
>>>>>>>
private StreamInfo _streamInfo;
public TimeSpan _startFrom;
<<<<<<<
var streamInfo = new StreamInfo();
=======
var streamInfo = new StreamInfo();
//var query = new VideoStreamOptions();
>>>>>>>
var streamInfo = new StreamInfo();
<<<<<<<
streamInfo = await CreateVideoStream(SelectedItem.Id, _startPositionTicks, SelectedItem.MediaSources, SelectedItem.Type.ToLower().Equals("channelvideoitem"));
=======
streamInfo = CreateVideoStream(SelectedItem.Id, _startPositionTicks, SelectedItem.MediaSources, SelectedItem.Type.ToLower().Equals("channelvideoitem"));
//query = CreateVideoStreamOptions(SelectedItem.Id, _startPositionTicks, SelectedItem.Type.ToLower().Equals("channelvideoitem"));
>>>>>>>
streamInfo = await CreateVideoStream(SelectedItem.Id, _startPositionTicks, SelectedItem.MediaSources, SelectedItem.Type.ToLower().Equals("channelvideoitem"));
<<<<<<<
streamInfo = await CreateVideoStream(RecordingItem.Id, _startPositionTicks);
=======
//query = CreateVideoStreamOptions(RecordingItem.Id, _startPositionTicks);
streamInfo = CreateVideoStream(RecordingItem.Id, _startPositionTicks);
>>>>>>>
streamInfo = await CreateVideoStream(RecordingItem.Id, _startPositionTicks);
<<<<<<<
streamInfo = await CreateVideoStream(ProgrammeItem.ChannelId, _startPositionTicks, channel.MediaSources, useHls: true);
=======
streamInfo = CreateVideoStream(ProgrammeItem.ChannelId, _startPositionTicks, channel.MediaSources, useHls: true);
>>>>>>>
streamInfo = await CreateVideoStream(ProgrammeItem.ChannelId, _startPositionTicks, channel.MediaSources, useHls: true);
<<<<<<<
var url = streamInfo.ToUrl(ApiClient.GetApiUrl("/"), ApiClient.AccessToken);
=======
var url = streamInfo.ToUrl(ApiClient.GetApiUrl("/"), ApiClient.AccessToken);
_streamInfo = streamInfo;
//var url = PlayerSourceType == PlayerSourceType.Programme ? ApiClient.GetHlsVideoStreamUrl(query) : ApiClient.GetVideoStreamUrl(query);
>>>>>>>
var url = streamInfo.ToUrl(ApiClient.GetApiUrl("/"), ApiClient.AccessToken);
_streamInfo = streamInfo;
<<<<<<<
var isSyncedVideo = streamInfo.MediaSource != null && streamInfo.MediaSource.Protocol == MediaProtocol.File;
=======
if (EndTime.Ticks > 0 && !IsDirectStream)
{
EndTime = TimeSpan.FromTicks(EndTime.Ticks - _startPositionTicks);
}
>>>>>>>
var isSyncedVideo = streamInfo.MediaSource != null && streamInfo.MediaSource.Protocol == MediaProtocol.File;
if (EndTime.Ticks > 0 && !IsDirectStream)
{
EndTime = TimeSpan.FromTicks(EndTime.Ticks - _startPositionTicks);
}
<<<<<<<
_streamInfo = streamInfo;
=======
if (_isResume && IsDirectStream)
{
_startFrom = TimeSpan.FromTicks(_startPositionTicks);
}
RaisePropertyChanged(() => IsDirectStream);
VideoUrl = url;
Debug.WriteLine(VideoUrl);
>>>>>>>
_streamInfo = streamInfo;
if (_isResume && IsDirectStream)
{
_startFrom = TimeSpan.FromTicks(_startPositionTicks);
}
RaisePropertyChanged(() => IsDirectStream);
<<<<<<<
var profile = VideoProfileHelper.GetWindowsPhoneProfile(isHls: useHls);
=======
var profile = VideoProfileHelper.GetWindowsPhoneProfile(useHls);
>>>>>>>
var profile = VideoProfileHelper.GetWindowsPhoneProfile(isHls: useHls); |
<<<<<<<
this.buttonGfxRefreshObject = new System.Windows.Forms.Button();
this.buttonGfxDumpDisplayList = new System.Windows.Forms.Button();
=======
this.buttonSaveVars = new System.Windows.Forms.Button();
this.buttonClearVars = new System.Windows.Forms.Button();
>>>>>>>
this.buttonGfxRefreshObject = new System.Windows.Forms.Button();
this.buttonGfxDumpDisplayList = new System.Windows.Forms.Button();
this.buttonSaveVars = new System.Windows.Forms.Button();
this.buttonClearVars = new System.Windows.Forms.Button();
<<<<<<<
this.groupBoxObjects.Size = new System.Drawing.Size(923, 379);
=======
this.groupBoxObjects.Size = new System.Drawing.Size(923, 376);
>>>>>>>
this.groupBoxObjects.Size = new System.Drawing.Size(923, 376);
<<<<<<<
this.WatchVariablePanelObjects.Size = new System.Drawing.Size(915, 157);
=======
this.WatchVariablePanelObjects.Size = new System.Drawing.Size(915, 154);
>>>>>>>
this.WatchVariablePanelObjects.Size = new System.Drawing.Size(915, 154);
<<<<<<<
this.tableLayoutPanelFile.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 223F));
=======
this.tableLayoutPanelFile.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 220F));
>>>>>>>
this.tableLayoutPanelFile.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 220F));
<<<<<<<
this.glControlMap.Size = new System.Drawing.Size(708, 454);
=======
this.glControlMap.Size = new System.Drawing.Size(699, 454);
>>>>>>>
this.glControlMap.Size = new System.Drawing.Size(699, 454);
<<<<<<<
this.splitContainerModelTables.Size = new System.Drawing.Size(323, 412);
=======
this.splitContainerModelTables.Size = new System.Drawing.Size(374, 412);
>>>>>>>
this.splitContainerModelTables.Size = new System.Drawing.Size(374, 412);
<<<<<<<
this.dataGridViewVertices.Size = new System.Drawing.Size(312, 181);
=======
this.dataGridViewVertices.Size = new System.Drawing.Size(363, 181);
>>>>>>>
this.dataGridViewVertices.Size = new System.Drawing.Size(363, 181);
<<<<<<<
this.dataGridViewTriangles.Size = new System.Drawing.Size(312, 189);
=======
this.dataGridViewTriangles.Size = new System.Drawing.Size(363, 189);
>>>>>>>
this.dataGridViewTriangles.Size = new System.Drawing.Size(312, 189);
this.dataGridViewTriangles.Size = new System.Drawing.Size(363, 189);
<<<<<<<
private TabPage tabPageGfx;
private SplitContainer splitContainerGfxLeft;
private TreeView treeViewGfx;
private SplitContainer splitContainerGfxRight;
private WatchVariablePanel watchVariablePanelGfx;
private RichTextBox richTextBoxGfx;
private SplitContainer splitContainerGfxMiddle;
private Button buttonGfxRefresh;
private Button buttonGfxRefreshObject;
private Button buttonGfxDumpDisplayList;
=======
private Button buttonClearVars;
private Button buttonSaveVars;
>>>>>>>
private TabPage tabPageGfx;
private SplitContainer splitContainerGfxLeft;
private TreeView treeViewGfx;
private SplitContainer splitContainerGfxRight;
private WatchVariablePanel watchVariablePanelGfx;
private RichTextBox richTextBoxGfx;
private SplitContainer splitContainerGfxMiddle;
private Button buttonGfxRefresh;
private Button buttonGfxRefreshObject;
private Button buttonGfxDumpDisplayList;
private Button buttonClearVars;
private Button buttonSaveVars; |
<<<<<<<
SimplifyLogicNot,
=======
SimplifyShiftOperators,
>>>>>>>
SimplifyLogicNot,
SimplifyShiftOperators,
<<<<<<<
if (abortBeforeStep == ILAstOptimizationStep.SimplifyLogicNot) return;
modified |= block.RunOptimization(SimplifyLogicNot);
=======
if (abortBeforeStep == ILAstOptimizationStep.SimplifyShiftOperators) return;
modified |= block.RunOptimization(SimplifyShiftOperators);
>>>>>>>
if (abortBeforeStep == ILAstOptimizationStep.SimplifyLogicNot) return;
modified |= block.RunOptimization(SimplifyLogicNot);
if (abortBeforeStep == ILAstOptimizationStep.SimplifyShiftOperators) return;
modified |= block.RunOptimization(SimplifyShiftOperators); |
<<<<<<<
using ICSharpCode.ILSpy.Baml;
using ICSharpCode.ILSpy.Options;
=======
>>>>>>>
using ICSharpCode.ILSpy.Options; |
<<<<<<<
public static bool IsUnconditionalBranch(this OpCode opcode)
{
if (opcode.OpCodeType == OpCodeType.Prefix)
return false;
switch (opcode.FlowControl) {
case FlowControl.Branch:
case FlowControl.Throw:
case FlowControl.Return:
return true;
case FlowControl.Next:
case FlowControl.Call:
case FlowControl.Cond_Branch:
return false;
default:
throw new NotSupportedException(opcode.FlowControl.ToString());
}
}
public static ICSharpCode.NRefactory.TypeSystem.FullTypeName GetFullTypeName(this TypeDefinition typeDef)
{
return new ICSharpCode.NRefactory.TypeSystem.FullTypeName(typeDef.FullName);
}
=======
public static bool IsDelegate(this TypeDefinition type)
{
if (type.BaseType != null && type.BaseType.Namespace == "System") {
if (type.BaseType.Name == "MulticastDelegate")
return true;
if (type.BaseType.Name == "Delegate" && type.Name != "MulticastDelegate")
return true;
}
return false;
}
>>>>>>>
public static bool IsUnconditionalBranch(this OpCode opcode)
{
if (opcode.OpCodeType == OpCodeType.Prefix)
return false;
switch (opcode.FlowControl) {
case FlowControl.Branch:
case FlowControl.Throw:
case FlowControl.Return:
return true;
case FlowControl.Next:
case FlowControl.Call:
case FlowControl.Cond_Branch:
return false;
default:
throw new NotSupportedException(opcode.FlowControl.ToString());
}
}
public static ICSharpCode.NRefactory.TypeSystem.FullTypeName GetFullTypeName(this TypeDefinition typeDef)
{
return new ICSharpCode.NRefactory.TypeSystem.FullTypeName(typeDef.FullName);
}
public static bool IsDelegate(this TypeDefinition type)
{
if (type.BaseType != null && type.BaseType.Namespace == "System") {
if (type.BaseType.Name == "MulticastDelegate")
return true;
if (type.BaseType.Name == "Delegate" && type.Name != "MulticastDelegate")
return true;
}
return false;
} |
<<<<<<<
protected virtual void OnDecompilationFinished(DecompileEventArgs e)
{
if (DecompileFinished != null) {
DecompileFinished(this, e);
}
}
protected void NotifyDecompilationFinished(BaseCodeMappings b)
{
if (b is AstBuilder) {
var builder = b as AstBuilder;
var nodes = TreeTraversal
.PreOrder((AstNode)builder.CompilationUnit, n => n.Children)
.Where(n => n is AttributedNode && n.Annotation<Tuple<int, int>>() != null);
OnDecompilationFinished(new DecompileEventArgs {
CodeMappings = builder.CodeMappings,
LocalVariables = builder.LocalVariables,
DecompiledMemberReferences = builder.DecompiledMemberReferences,
AstNodes = nodes
});
}
if (b is ReflectionDisassembler) {
var dis = b as ReflectionDisassembler;
OnDecompilationFinished(new DecompileEventArgs {
CodeMappings = dis.CodeMappings,
DecompiledMemberReferences = dis.DecompiledMemberReferences,
AstNodes = null // TODO: how can I find the nodes with line numbers from dis?
});
}
}
=======
/// <summary>
/// Used by the analyzer to map compiler generated code back to the original code's location
/// </summary>
public virtual MemberReference GetOriginalCodeLocation(MemberReference member)
{
return member;
}
>>>>>>>
/// <summary>
/// Used by the analyzer to map compiler generated code back to the original code's location
/// </summary>
public virtual MemberReference GetOriginalCodeLocation(MemberReference member)
{
return member;
}
protected virtual void OnDecompilationFinished(DecompileEventArgs e)
{
if (DecompileFinished != null) {
DecompileFinished(this, e);
}
}
protected void NotifyDecompilationFinished(BaseCodeMappings b)
{
if (b is AstBuilder) {
var builder = b as AstBuilder;
var nodes = TreeTraversal
.PreOrder((AstNode)builder.CompilationUnit, n => n.Children)
.Where(n => n is AttributedNode && n.Annotation<Tuple<int, int>>() != null);
OnDecompilationFinished(new DecompileEventArgs {
CodeMappings = builder.CodeMappings,
LocalVariables = builder.LocalVariables,
DecompiledMemberReferences = builder.DecompiledMemberReferences,
AstNodes = nodes
});
}
if (b is ReflectionDisassembler) {
var dis = b as ReflectionDisassembler;
OnDecompilationFinished(new DecompileEventArgs {
CodeMappings = dis.CodeMappings,
DecompiledMemberReferences = dis.DecompiledMemberReferences,
AstNodes = null // TODO: how can I find the nodes with line numbers from dis?
});
}
} |
<<<<<<<
using ICSharpCode.ILSpy.Options;
=======
>>>>>>>
using ICSharpCode.ILSpy.Options; |
<<<<<<<
using System.Windows.Media;
=======
using System.Windows.Interop;
>>>>>>>
using System.Windows.Interop;
using System.Windows.Media;
<<<<<<<
using ICSharpCode.Decompiler;
=======
>>>>>>>
using ICSharpCode.Decompiler; |
<<<<<<<
if (method.IsExplicitInterfaceImplementation && target.Expression is ThisReferenceExpression) {
var interfaceMember = method.ExplicitlyImplementedInterfaceMembers.First();
var castExpression = new CastExpression(expressionBuilder.ConvertType(interfaceMember.DeclaringType), target.Expression);
methodName = interfaceMember.Name;
=======
// settings.AlwaysCastTargetsOfExplicitInterfaceImplementationCalls == true is used in Windows Forms' InitializeComponent methods.
if (method.IsExplicitInterfaceImplementation && (target.Expression is ThisReferenceExpression || settings.AlwaysCastTargetsOfExplicitInterfaceImplementationCalls)) {
var castExpression = new CastExpression(expressionBuilder.ConvertType(method.ImplementedInterfaceMembers[0].DeclaringType), target.Expression);
methodName = method.ImplementedInterfaceMembers[0].Name;
>>>>>>>
// settings.AlwaysCastTargetsOfExplicitInterfaceImplementationCalls == true is used in Windows Forms' InitializeComponent methods.
if (method.IsExplicitInterfaceImplementation && (target.Expression is ThisReferenceExpression || settings.AlwaysCastTargetsOfExplicitInterfaceImplementationCalls)) {
var interfaceMember = method.ExplicitlyImplementedInterfaceMembers.First();
var castExpression = new CastExpression(expressionBuilder.ConvertType(interfaceMember.DeclaringType), target.Expression);
methodName = interfaceMember.Name; |
<<<<<<<
WriteEnum(typeDefinition.Attributes & TypeAttributes.VisibilityMask, typeVisibility);
WriteEnum(typeDefinition.Attributes & TypeAttributes.LayoutMask, typeLayout);
WriteEnum(typeDefinition.Attributes & TypeAttributes.StringFormatMask, typeStringFormat);
const TypeAttributes masks = TypeAttributes.ClassSemanticsMask | TypeAttributes.VisibilityMask | TypeAttributes.LayoutMask | TypeAttributes.StringFormatMask;
WriteFlags(typeDefinition.Attributes & ~masks, typeAttributes);
output.Write(typeDefinition.GetDeclaringType().IsNil ? typeDefinition.GetFullTypeName(metadata).ToILNameString() : DisassemblerHelpers.Escape(metadata.GetString(typeDefinition.Name)));
WriteTypeParameters(output, type.Module, new GenericContext(type), typeDefinition.GetGenericParameters());
output.MarkFoldStart(defaultCollapsed: isInType);
=======
WriteEnum(type.Attributes & TypeAttributes.VisibilityMask, typeVisibility);
WriteEnum(type.Attributes & TypeAttributes.LayoutMask, typeLayout);
WriteEnum(type.Attributes & TypeAttributes.StringFormatMask, typeStringFormat);
const TypeAttributes masks = TypeAttributes.ClassSemanticMask | TypeAttributes.VisibilityMask | TypeAttributes.LayoutMask | TypeAttributes.StringFormatMask;
WriteFlags(type.Attributes & ~masks, typeAttributes);
output.Write(DisassemblerHelpers.Escape(type.DeclaringType != null ? type.Name : type.FullName));
WriteTypeParameters(output, type);
output.MarkFoldStart(defaultCollapsed: !ExpandMemberDefinitions && isInType);
>>>>>>>
WriteEnum(typeDefinition.Attributes & TypeAttributes.VisibilityMask, typeVisibility);
WriteEnum(typeDefinition.Attributes & TypeAttributes.LayoutMask, typeLayout);
WriteEnum(typeDefinition.Attributes & TypeAttributes.StringFormatMask, typeStringFormat);
const TypeAttributes masks = TypeAttributes.ClassSemanticsMask | TypeAttributes.VisibilityMask | TypeAttributes.LayoutMask | TypeAttributes.StringFormatMask;
WriteFlags(typeDefinition.Attributes & ~masks, typeAttributes);
output.Write(typeDefinition.GetDeclaringType().IsNil ? typeDefinition.GetFullTypeName(metadata).ToILNameString() : DisassemblerHelpers.Escape(metadata.GetString(typeDefinition.Name)));
WriteTypeParameters(output, type.Module, new GenericContext(type), typeDefinition.GetGenericParameters());
output.MarkFoldStart(defaultCollapsed: !ExpandMemberDefinitions && isInType);
<<<<<<<
public void WriteModuleHeader(PEFile module)
=======
public void WriteModuleHeader(ModuleDefinition module, bool skipMVID = false)
>>>>>>>
public void WriteModuleHeader(PEFile module, bool skipMVID = false)
<<<<<<<
output.WriteLine(".module {0}", metadata.GetString(moduleDefinition.Name));
output.WriteLine("// MVID: {0}", metadata.GetGuid(moduleDefinition.Mvid).ToString("B").ToUpperInvariant());
=======
output.WriteLine(".module {0}", module.Name);
if (!skipMVID) {
output.WriteLine("// MVID: {0}", module.Mvid.ToString("B").ToUpperInvariant());
}
// TODO: imagebase, file alignment, stackreserve, subsystem
output.WriteLine(".corflags 0x{0:x} // {1}", module.Attributes, module.Attributes.ToString());
>>>>>>>
output.WriteLine(".module {0}", metadata.GetString(moduleDefinition.Name));
if (!skipMVID) {
output.WriteLine("// MVID: {0}", metadata.GetGuid(moduleDefinition.Mvid).ToString("B").ToUpperInvariant());
} |
<<<<<<<
new Action(delegate { InsertResult(this.Results, result); }));
=======
new Action(delegate { InsertResult(result); }));
>>>>>>>
new Action(delegate { InsertResult(this.Results, result); }));
<<<<<<<
void InsertResult(ObservableCollection<SearchResult> results, SearchResult result)
{
int index = results.BinarySearch(result, 0, results.Count - 1, SearchResult.Comparer);
results.Insert(index < 0 ? ~index : index, result);
}
=======
void InsertResult(SearchResult result)
{
if (Options.DisplaySettingsPanel.CurrentDisplaySettings.SortResults)
{
// Keep results collection sorted by "Fitness" by inserting result into correct place
// Inserts in the beginning shifts all elements, but there can be no more than 1000 items.
for (int i = 0; i < this.Results.Count; i++)
{
if (this.Results[i].Fitness < result.Fitness)
{
this.Results.Insert(i, result);
return;
}
}
this.Results.Insert(this.Results.Count - 1, result);
}
else
{
// Original code
this.Results.Insert(this.Results.Count - 1, result);
}
}
>>>>>>>
void InsertResult(ObservableCollection<SearchResult> results, SearchResult result)
{
if (Options.DisplaySettingsPanel.CurrentDisplaySettings.SortResults)
{
// Keep results collection sorted by "Fitness" by inserting result into correct place
// Inserts in the beginning shifts all elements, but there can be no more than 1000 items.
for (int i = 0; i < results.Count; i++)
{
if (results[i].Fitness < result.Fitness)
{
results.Insert(i, result);
return;
}
}
results.Insert(results.Count - 1, result);
}
else
{
// Original Code
int index = results.BinarySearch(result, 0, results.Count - 1, SearchResult.Comparer);
results.Insert(index < 0 ? ~index : index, result);
}
}
<<<<<<<
=======
public float Fitness { get; set; }
>>>>>>>
public float Fitness { get; set; } |
<<<<<<<
RunForLibrary(cscOptions: cscOptions);
=======
Run(cscOptions: cscOptions, decompilerSettings: new DecompilerSettings {
NullPropagation = false
});
>>>>>>>
RunForLibrary(cscOptions: cscOptions, decompilerSettings: new DecompilerSettings {
NullPropagation = false
});
<<<<<<<
var executable = Tester.AssembleIL(ilFile, asmOptions);
var decompiled = Tester.DecompileCSharp(executable, decompilerSettings);
=======
var executable = Tester.AssembleIL(ilFile, asmOptions | AssemblerOptions.Library);
var decompiled = Tester.DecompileCSharp(executable, decompilerSettings ?? Tester.GetSettings(cscOptions));
>>>>>>>
var executable = Tester.AssembleIL(ilFile, asmOptions);
var decompiled = Tester.DecompileCSharp(executable, decompilerSettings ?? Tester.GetSettings(cscOptions)); |
<<<<<<<
volatile IndexEntry[] index; // SORTED array of index entries
=======
readonly Encoding encoding;
DateTime lastWriteDate;
IndexEntry[] index; // SORTED array of index entries
>>>>>>>
readonly Encoding encoding;
IndexEntry[] index; // SORTED array of index entries
<<<<<<<
redirectedXmlReader.XmlResolver = null; // no DTD resolving
=======
redirectedXmlReader.XmlResolver = null; // no DTD resolving
redirectedXmlReader.MoveToContent();
>>>>>>>
redirectedXmlReader.XmlResolver = null; // no DTD resolving
redirectedXmlReader.MoveToContent(); |
<<<<<<<
// Create mapping - used in debugger
MethodMapping methodMapping = propDef.GetMethod.CreateCodeMapping(CSharpCodeMapping.SourceCodeMappings);
astProp.Getter = new Accessor {
Body = AstMethodBodyBuilder.CreateMethodBody(propDef.GetMethod, context)
}.WithAnnotation(propDef.GetMethod);
=======
astProp.Getter = new Accessor();
astProp.Getter.Body = AstMethodBodyBuilder.CreateMethodBody(propDef.GetMethod, context);
astProp.AddAnnotation(propDef.GetMethod);
>>>>>>>
// Create mapping - used in debugger
MethodMapping methodMapping = propDef.GetMethod.CreateCodeMapping(CSharpCodeMapping.SourceCodeMappings);
astProp.Getter = new Accessor {
Body = AstMethodBodyBuilder.CreateMethodBody(propDef.GetMethod, context)
}.WithAnnotation(propDef.GetMethod);
<<<<<<<
if (methodMapping != null)
astProp.Getter.AddAnnotation(methodMapping);
=======
if ((getterModifiers & Modifiers.VisibilityMask) != (astProp.Modifiers & Modifiers.VisibilityMask))
astProp.Getter.Modifiers = getterModifiers & Modifiers.VisibilityMask;
>>>>>>>
if ((getterModifiers & Modifiers.VisibilityMask) != (astProp.Modifiers & Modifiers.VisibilityMask))
astProp.Getter.Modifiers = getterModifiers & Modifiers.VisibilityMask;
if (methodMapping != null)
astProp.Getter.AddAnnotation(methodMapping);
<<<<<<<
// Create mapping - used in debugger
MethodMapping methodMapping = propDef.SetMethod.CreateCodeMapping(CSharpCodeMapping.SourceCodeMappings);
astProp.Setter = new Accessor {
Body = AstMethodBodyBuilder.CreateMethodBody(propDef.SetMethod, context)
}.WithAnnotation(propDef.SetMethod);
=======
astProp.Setter = new Accessor();
astProp.Setter.Body = AstMethodBodyBuilder.CreateMethodBody(propDef.SetMethod, context);
astProp.Setter.AddAnnotation(propDef.SetMethod);
>>>>>>>
// Create mapping - used in debugger
MethodMapping methodMapping = propDef.SetMethod.CreateCodeMapping(CSharpCodeMapping.SourceCodeMappings);
astProp.Setter = new Accessor {
Body = AstMethodBodyBuilder.CreateMethodBody(propDef.SetMethod, context)
}.WithAnnotation(propDef.SetMethod);
<<<<<<<
if (methodMapping != null)
astProp.Setter.AddAnnotation(methodMapping);
=======
if ((setterModifiers & Modifiers.VisibilityMask) != (astProp.Modifiers & Modifiers.VisibilityMask))
astProp.Setter.Modifiers = setterModifiers & Modifiers.VisibilityMask;
>>>>>>>
if ((setterModifiers & Modifiers.VisibilityMask) != (astProp.Modifiers & Modifiers.VisibilityMask))
astProp.Setter.Modifiers = setterModifiers & Modifiers.VisibilityMask;
if (methodMapping != null)
astProp.Setter.AddAnnotation(methodMapping); |
<<<<<<<
[ExportOptionPage(Title = nameof(Properties.Resources.Display), Order = 1)]
=======
[ExportOptionPage(Title = "Display", Order = 20)]
>>>>>>>
[ExportOptionPage(Title = nameof(Properties.Resources.Display), Order = 20)] |
<<<<<<<
using System.Reactive;
using System.Reactive.Linq;
=======
using System.Threading;
using System.Windows.Input;
>>>>>>>
using System.Reactive;
using System.Threading;
using System.Reactive.Linq; |
<<<<<<<
// Create mapping - used in debugger
MemberMapping methodMapping = propDef.GetMethod.CreateCodeMapping(CSharpCodeMapping.SourceCodeMappings);
astProp.Getter = new Accessor {
Body = AstMethodBodyBuilder.CreateMethodBody(propDef.GetMethod, context)
}.WithAnnotation(propDef.GetMethod);
=======
astProp.Getter = new Accessor();
astProp.Getter.Body = CreateMethodBody(propDef.GetMethod);
astProp.AddAnnotation(propDef.GetMethod);
>>>>>>>
// Create mapping - used in debugger
MemberMapping methodMapping = propDef.GetMethod.CreateCodeMapping(CSharpCodeMapping.SourceCodeMappings);
astProp.Getter = new Accessor();
astProp.Getter.Body = CreateMethodBody(propDef.GetMethod);
astProp.AddAnnotation(propDef.GetMethod);
<<<<<<<
// Create mapping - used in debugger
MemberMapping methodMapping = propDef.SetMethod.CreateCodeMapping(CSharpCodeMapping.SourceCodeMappings);
astProp.Setter = new Accessor {
Body = AstMethodBodyBuilder.CreateMethodBody(propDef.SetMethod, context)
}.WithAnnotation(propDef.SetMethod);
=======
astProp.Setter = new Accessor();
astProp.Setter.Body = CreateMethodBody(propDef.SetMethod);
astProp.Setter.AddAnnotation(propDef.SetMethod);
>>>>>>>
// Create mapping - used in debugger
MemberMapping methodMapping = propDef.SetMethod.CreateCodeMapping(CSharpCodeMapping.SourceCodeMappings);
astProp.Setter = new Accessor();
astProp.Setter.Body = CreateMethodBody(propDef.SetMethod);
astProp.Setter.AddAnnotation(propDef.SetMethod); |
<<<<<<<
readonly MetadataLoader typeReferenceCecilLoader = new MetadataLoader();
=======
readonly CecilLoader typeReferenceCecilLoader;
>>>>>>>
readonly MetadataLoader typeReferenceCecilLoader;
<<<<<<<
MetadataLoader cecilLoader = new MetadataLoader { IncludeInternalMembers = true, LazyLoad = true, ShortenInterfaceImplNames = false };
=======
typeReferenceCecilLoader = new CecilLoader {
UseDynamicType = settings.Dynamic,
UseTupleTypes = settings.TupleTypes,
};
CecilLoader cecilLoader = new CecilLoader {
IncludeInternalMembers = true,
LazyLoad = true,
OnEntityLoaded = StoreMemberReference,
ShortenInterfaceImplNames = false,
UseDynamicType = settings.Dynamic,
UseTupleTypes = settings.TupleTypes,
};
>>>>>>>
typeReferenceCecilLoader = new MetadataLoader {
UseDynamicType = settings.Dynamic,
UseTupleTypes = settings.TupleTypes,
};
MetadataLoader cecilLoader = new MetadataLoader {
IncludeInternalMembers = true,
LazyLoad = true,
ShortenInterfaceImplNames = false,
UseDynamicType = settings.Dynamic,
UseTupleTypes = settings.TupleTypes,
}; |
<<<<<<<
codeDomBuilder.RunTransformations(transformAbortCondition);
codeDomBuilder.GenerateCode(output);
OnDecompilationFinished(new DecompileEventArgs { CodeMappings = codeDomBuilder.CodeMappings, LocalVariables = codeDomBuilder.LocalVariables, DecompiledMemberReferences = codeDomBuilder.DecompiledMemberReferences });
=======
RunTransformsAndGenerateCode(codeDomBuilder, output, options);
>>>>>>>
RunTransformsAndGenerateCode(codeDomBuilder, output, options);
OnDecompilationFinished(new DecompileEventArgs { CodeMappings = codeDomBuilder.CodeMappings, LocalVariables = codeDomBuilder.LocalVariables, DecompiledMemberReferences = codeDomBuilder.DecompiledMemberReferences });
<<<<<<<
codeDomBuilder.RunTransformations(transformAbortCondition);
codeDomBuilder.GenerateCode(output);
OnDecompilationFinished(new DecompileEventArgs { CodeMappings = codeDomBuilder.CodeMappings, LocalVariables = codeDomBuilder.LocalVariables, DecompiledMemberReferences = codeDomBuilder.DecompiledMemberReferences });
=======
RunTransformsAndGenerateCode(codeDomBuilder, output, options);
>>>>>>>
RunTransformsAndGenerateCode(codeDomBuilder, output, options);
OnDecompilationFinished(new DecompileEventArgs { CodeMappings = codeDomBuilder.CodeMappings, LocalVariables = codeDomBuilder.LocalVariables, DecompiledMemberReferences = codeDomBuilder.DecompiledMemberReferences });
<<<<<<<
codeDomBuilder.RunTransformations(transformAbortCondition);
codeDomBuilder.GenerateCode(output);
OnDecompilationFinished(new DecompileEventArgs { DecompiledMemberReferences = codeDomBuilder.DecompiledMemberReferences });
=======
RunTransformsAndGenerateCode(codeDomBuilder, output, options);
>>>>>>>
RunTransformsAndGenerateCode(codeDomBuilder, output, options);
OnDecompilationFinished(new DecompileEventArgs { DecompiledMemberReferences = codeDomBuilder.DecompiledMemberReferences });
<<<<<<<
codeDomBuilder.RunTransformations(transformAbortCondition);
codeDomBuilder.GenerateCode(output);
OnDecompilationFinished(new DecompileEventArgs { CodeMappings = codeDomBuilder.CodeMappings, LocalVariables = codeDomBuilder.LocalVariables, DecompiledMemberReferences = codeDomBuilder.DecompiledMemberReferences });
=======
RunTransformsAndGenerateCode(codeDomBuilder, output, options);
>>>>>>>
RunTransformsAndGenerateCode(codeDomBuilder, output, options);
OnDecompilationFinished(new DecompileEventArgs { CodeMappings = codeDomBuilder.CodeMappings, LocalVariables = codeDomBuilder.LocalVariables, DecompiledMemberReferences = codeDomBuilder.DecompiledMemberReferences });
<<<<<<<
codeDomBuilder.RunTransformations(transformAbortCondition);
codeDomBuilder.GenerateCode(output);
OnDecompilationFinished(new DecompileEventArgs { CodeMappings = codeDomBuilder.CodeMappings, LocalVariables = codeDomBuilder.LocalVariables, DecompiledMemberReferences = codeDomBuilder.DecompiledMemberReferences });
=======
RunTransformsAndGenerateCode(codeDomBuilder, output, options);
}
void RunTransformsAndGenerateCode(AstBuilder astBuilder, ITextOutput output, DecompilationOptions options)
{
astBuilder.RunTransformations(transformAbortCondition);
if (options.DecompilerSettings.ShowXmlDocumentation)
AddXmlDocTransform.Run(astBuilder.CompilationUnit);
astBuilder.GenerateCode(output);
>>>>>>>
RunTransformsAndGenerateCode(codeDomBuilder, output, options);
OnDecompilationFinished(new DecompileEventArgs { CodeMappings = codeDomBuilder.CodeMappings, LocalVariables = codeDomBuilder.LocalVariables, DecompiledMemberReferences = codeDomBuilder.DecompiledMemberReferences });
}
void RunTransformsAndGenerateCode(AstBuilder astBuilder, ITextOutput output, DecompilationOptions options)
{
astBuilder.RunTransformations(transformAbortCondition);
if (options.DecompilerSettings.ShowXmlDocumentation)
AddXmlDocTransform.Run(astBuilder.CompilationUnit);
astBuilder.GenerateCode(output); |
<<<<<<<
if (!displayClass.Variables.TryGetValue(field, out var v)) {
=======
// Use the unspecialized member definition to make reference comparisons in dictionary possible.
var field = (IField)inst.Field.MemberDefinition;
// However, we want the specialized version, so that display-class type parameters are
// substituted with the type parameters from the use-site.
var fieldType = inst.Field.Type;
if (!displayClass.Variables.TryGetValue(field, out DisplayClassVariable info)) {
>>>>>>>
// We want the specialized version, so that display-class type parameters are
// substituted with the type parameters from the use-site.
var fieldType = field.Type;
// However, use the unspecialized member definition to make reference comparisons in dictionary possible.
field = (IField)field.MemberDefinition;
if (!displayClass.Variables.TryGetValue(field, out var v)) {
<<<<<<<
v = displayClass.DeclaringFunction.RegisterVariable(VariableKind.Local, GetVariableTypeFromClosureField(field), field.Name);
=======
var v = displayClass.DeclaringFunction.RegisterVariable(VariableKind.Local, fieldType, field.Name);
>>>>>>>
v = displayClass.DeclaringFunction.RegisterVariable(VariableKind.Local, fieldType, field.Name); |
<<<<<<<
public class RepackAssemblyResolver : DefaultAssemblyResolver
{
public void RegisterAssemblies(List<AssemblyDefinition> mergedAssemblies)
{
foreach (var assemblyDefinition in mergedAssemblies)
{
RegisterAssembly(assemblyDefinition);
}
}
}
=======
>>>>>>>
<<<<<<<
internal RepackOptions Options;
internal ILogger Logger;
=======
// keep ILMerge syntax (both command-line & api) for compatibility (commented out: not implemented yet)
public bool AllowDuplicateResources { get; set; }
public bool AllowMultipleAssemblyLevelAttributes { get; set; }
public bool AllowWildCards { get; set; }
public bool AllowZeroPeKind { get; set; }
public string AttributeFile { get; set; }
public bool Closed { get; set; } // UNIMPL
public bool CopyAttributes { get; set; }
public bool DebugInfo { get; set; }
public bool DelaySign { get; set; }
public string ExcludeFile { get; set; }
public int FileAlignment { get; set; } // UNIMPL, not supported by cecil
public string[] InputAssemblies { get; set; }
public bool Internalize { get; set; }
public string KeyFile { get; set; }
public bool Parallel { get; set; }
public bool PauseBeforeExit { get; set; }
public string OutputFile { get; set; }
public bool PublicKeyTokens { get; set; } // UNIMPL
public bool StrongNameLost { get; private set; }
public Kind? TargetKind { get; set; }
public string TargetPlatformDirectory { get; set; }
public string TargetPlatformVersion { get; set; }
public bool UnionMerge { get; set; }
public Version Version { get; set; }
public bool XmlDocumentation { get; set; }
// end of ILMerge-similar attributes
public bool NoRepackRes { get; set; }
public bool KeepOtherVersionReferences { get; set; }
public bool LineIndexation { get; set; }
>>>>>>>
internal RepackOptions Options;
internal ILogger Logger;
<<<<<<<
=======
public Logger Logger
{
get { return _logger; }
}
internal readonly RepackAssemblyResolver globalAssemblyResolver = new RepackAssemblyResolver();
private readonly Hashtable allowedDuplicateTypes = new Hashtable();
private readonly List<string> allowedDuplicateNameSpaces = new List<string>();
private List<Regex> excludeInternalizeMatches;
>>>>>>>
<<<<<<<
MergedAssemblyFiles = Options.InputAssemblies.SelectMany(x => ResolveFile(x)).Distinct().ToList();
=======
MergedAssemblyFiles = InputAssemblies.SelectMany(ResolveFile).Distinct().ToList();
>>>>>>>
MergedAssemblyFiles = Options.InputAssemblies.SelectMany(ResolveFile).Distinct().ToList();
<<<<<<<
// prevent writing PDB if we haven't read any
Options.DebugInfo = mergedDebugInfo;
=======
>>>>>>>
<<<<<<<
finally
{
if (Interlocked.Decrement(ref remain) == 0)
evt.Set();
}
}));
}
evt.WaitOne();
// prevent writing PDB if we haven't read any
Options.DebugInfo = mergedDebugInfo;
=======
}
if (!AllowZeroPeKind && (mergeAsm.MainModule.Attributes & ModuleAttributes.ILOnly) == 0)
throw new ArgumentException("Failed to load assembly with Zero PeKind: " + assembly);
>>>>>>>
}
if (!Options.AllowZeroPeKind && (mergeAsm.MainModule.Attributes & ModuleAttributes.ILOnly) == 0)
throw new ArgumentException("Failed to load assembly with Zero PeKind: " + assembly);
<<<<<<<
Options.ParseProperties();
=======
Logger.InitializeLogFile();
ParseProperties();
>>>>>>>
Options.ParseProperties();
<<<<<<<
if (Options.Parallel)
ReadInputAssembliesParallel();
else
ReadInputAssemblies();
Options.GlobalAssemblyResolver.RegisterAssemblies(MergedAssemblies);
var asmNames = Options.KeepOtherVersionReferences ?
MergedAssemblies.Select(x => x.FullName) :
MergedAssemblies.Select(x => x.Name.Name);
=======
ReadInputAssemblies();
globalAssemblyResolver.RegisterAssemblies(MergedAssemblies);
>>>>>>>
ReadInputAssemblies();
Options.GlobalAssemblyResolver.RegisterAssemblies(MergedAssemblies);
<<<<<<<
Logger.INFO("Writing output assembly to disk");
=======
>>>>>>>
<<<<<<<
TargetAssemblyDefinition.Write(Options.OutputFile, parameters);
=======
TargetAssemblyDefinition.Write(OutputFile, parameters);
Logger.INFO("Writing output assembly to disk");
>>>>>>>
TargetAssemblyDefinition.Write(Options.OutputFile, parameters);
Logger.INFO("Writing output assembly to disk");
<<<<<<<
Logger.WARN("Method '" + methodDefinition.FullName + "' not found in merged type '" + nt.FullName + "'");
}
return ret;
}
private void CopyCustomAttributes(Collection<CustomAttribute> input, Collection<CustomAttribute> output, IGenericParameterProvider context)
{
CopyCustomAttributes(input, output, true, context);
}
private CustomAttribute Copy(CustomAttribute ca, IGenericParameterProvider context)
{
CustomAttribute newCa = new CustomAttribute(Import(ca.Constructor));
foreach (var arg in ca.ConstructorArguments)
newCa.ConstructorArguments.Add(Copy(arg, context));
foreach (var arg in ca.Fields)
newCa.Fields.Add(Copy(arg, context));
foreach (var arg in ca.Properties)
newCa.Properties.Add(Copy(arg, context));
return newCa;
}
private void CopyCustomAttributes(Collection<CustomAttribute> input, Collection<CustomAttribute> output, bool allowMultiple, IGenericParameterProvider context)
{
foreach (CustomAttribute ca in input)
{
var caType = ca.AttributeType;
var similarAttributes = output.Where(attr => reflectionHelper.AreSame(attr.AttributeType, caType)).ToList();
if (similarAttributes.Count != 0)
{
if (!allowMultiple)
continue;
if (!CustomAttributeTypeAllowsMultiple(caType))
continue;
if (similarAttributes.Any(x =>
reflectionHelper.AreSame(x.ConstructorArguments, ca.ConstructorArguments) &&
reflectionHelper.AreSame(x.Fields, ca.Fields) &&
reflectionHelper.AreSame(x.Properties, ca.Properties)
))
continue;
}
output.Add(Copy(ca, context));
}
}
private bool CustomAttributeTypeAllowsMultiple(TypeReference type)
{
if (type.FullName == "IKVM.Attributes.JavaModuleAttribute" || type.FullName == "IKVM.Attributes.PackageListAttribute")
{
// IKVM module attributes, although they don't allow multiple, IKVM supports the attribute being specified multiple times
return true;
}
TypeDefinition typeDef = type.Resolve();
if (typeDef != null)
{
var ca = typeDef.CustomAttributes.FirstOrDefault(x => x.AttributeType.FullName == "System.AttributeUsageAttribute");
if (ca != null)
{
var prop = ca.Properties.FirstOrDefault(y => y.Name == "AllowMultiple");
if (prop.Argument.Value is bool)
{
return (bool)prop.Argument.Value;
}
}
}
// default is false
return false;
}
private void CopyTypeReferences(Collection<TypeReference> input, Collection<TypeReference> output, IGenericParameterProvider context)
{
foreach (TypeReference ta in input)
{
output.Add(Import(ta, context));
}
}
public TypeDefinition GetMergedTypeFromTypeRef(TypeReference reference)
{
return mappingHandler.GetRemappedType(reference);
}
private TypeReference Import(TypeReference reference, IGenericParameterProvider context)
{
TypeDefinition type = GetMergedTypeFromTypeRef(reference);
if (type != null)
return type;
reference = platformFixer.FixPlatformVersion(reference);
try
{
if (context == null)
{
// we come here when importing types used for assembly-level custom attributes
return TargetAssemblyMainModule.Import(reference);
}
return TargetAssemblyMainModule.Import(reference, context);
}
catch (ArgumentOutOfRangeException) // working around a bug in Cecil
{
Logger.ERROR ("Problem adding reference: " + reference.FullName);
throw;
}
}
private FieldReference Import(FieldReference reference, IGenericParameterProvider context)
{
FieldReference importReference = platformFixer.FixPlatformVersion(reference);
return TargetAssemblyMainModule.Import(importReference, context);
}
private MethodReference Import(MethodReference reference)
{
MethodReference importReference = platformFixer.FixPlatformVersion(reference);
return TargetAssemblyMainModule.Import(importReference);
}
private MethodReference Import(MethodReference reference, IGenericParameterProvider context)
{
// If this is a Method/TypeDefinition, it will be corrected to a definition again later
MethodReference importReference = platformFixer.FixPlatformVersion(reference);
return TargetAssemblyMainModule.Import(importReference, context);
}
private void CloneTo(PropertyDefinition prop, TypeDefinition nt, Collection<PropertyDefinition> col)
{
// ignore duplicate property
var others = nt.Properties.Where(x => x.Name == prop.Name).ToList();
if (others.Any())
{
bool skip = false;
if (!IsIndexer(prop) || !IsIndexer(others.First()))
{
skip = true;
}
else
{
// "Item" property is used to implement Indexer operators
// It may be specified more than one, with extra arguments to get/set methods
// Note than one may also define a standard "Item" property, in which case he won't be able to define Indexers
=======
bool skip = false;
if (!IsIndexer(prop) || !IsIndexer(others.First()))
{
skip = true;
}
else
{
// "Item" property is used to implement Indexer operators
// It may be specified more than one, with extra arguments to get/set methods
// Note than one may also define a standard "Item" property, in which case he won't be able to define Indexers
>>>>>>>
bool skip = false;
if (!IsIndexer(prop) || !IsIndexer(others.First()))
{
skip = true;
}
else
{
// "Item" property is used to implement Indexer operators
// It may be specified more than one, with extra arguments to get/set methods
// Note than one may also define a standard "Item" property, in which case he won't be able to define Indexers |
<<<<<<<
while (ForceUnbanning)
{
await Task.Delay(25);
}
FarmingPokemons = true;
var update = await client.UpdatePlayerLocation(pokemon.Latitude, pokemon.Longitude);
=======
await locationManager.update(pokemon.Latitude, pokemon.Longitude);
>>>>>>>
if (ForceUnbanning)
break;
FarmingPokemons = true;
await locationManager.update(pokemon.Latitude, pokemon.Longitude);
<<<<<<<
while (ForceUnbanning)
{
await Task.Delay(25);
}
FarmingStops = true;
var update = await client.UpdatePlayerLocation(pokeStop.Latitude, pokeStop.Longitude);
=======
double pokeStopDistance = locationManager.getDistance(pokeStop.Latitude, pokeStop.Longitude);
await locationManager.update(pokeStop.Latitude, pokeStop.Longitude);
>>>>>>>
if (ForceUnbanning)
break;
FarmingStops = true;
double pokeStopDistance = locationManager.getDistance(pokeStop.Latitude, pokeStop.Longitude);
await locationManager.update(pokeStop.Latitude, pokeStop.Longitude);
<<<<<<<
FarmingStops = false;
await Task.Delay(15000);
await ExecuteCatchAllNearbyPokemons(client);
=======
var pokeStopMapObjects = await client.GetMapObjects();
/* Gets all pokeStops near this pokeStop which are not in the set of pokeStops being currently
* traversed and which are ready to be farmed again. */
var pokeStopsNearPokeStop = pokeStopMapObjects.MapCells.SelectMany(i => i.Forts).Where(i =>
i.Type == FortType.Checkpoint
&& i.CooldownCompleteTimestampMs < DateTime.UtcNow.ToUnixTime()
&& !pokeStopSet.Contains(i)
);
/* We choose the longest list of farmable PokeStops to traverse next, though we could use a different
* criterion, such as the number of PokeStops with lures in the list.*/
if (pokeStopsNearPokeStop.Count() > (nextPokeStopList == null ? 0 : nextPokeStopList.Count()))
{
nextPokeStopList = pokeStopsNearPokeStop;
}
if (ClientSettings.CatchPokemon)
await ExecuteCatchAllNearbyPokemons(client);
}
if (nextPokeStopList != null)
{
client.RecycleItems(client);
await ExecuteFarmingPokestopsAndPokemons(client, nextPokeStopList);
>>>>>>>
var pokeStopMapObjects = await client.GetMapObjects();
/* Gets all pokeStops near this pokeStop which are not in the set of pokeStops being currently
* traversed and which are ready to be farmed again. */
var pokeStopsNearPokeStop = pokeStopMapObjects.MapCells.SelectMany(i => i.Forts).Where(i =>
i.Type == FortType.Checkpoint
&& i.CooldownCompleteTimestampMs < DateTime.UtcNow.ToUnixTime()
&& !pokeStopSet.Contains(i)
);
/* We choose the longest list of farmable PokeStops to traverse next, though we could use a different
* criterion, such as the number of PokeStops with lures in the list.*/
if (pokeStopsNearPokeStop.Count() > (nextPokeStopList == null ? 0 : nextPokeStopList.Count()))
{
nextPokeStopList = pokeStopsNearPokeStop;
}
if (ClientSettings.CatchPokemon)
await ExecuteCatchAllNearbyPokemons(client);
}
FarmingStops = false;
if (nextPokeStopList != null)
{
client.RecycleItems(client);
await ExecuteFarmingPokestopsAndPokemons(client, nextPokeStopList);
<<<<<<<
private async void forceUnbanToolStripMenuItem_Click(object sender, EventArgs e)
{
if (client != null)
{
if (ForceUnbanning)
{
ColoredConsoleWrite(Color.Red, "A force unban attempt is in action... Please wait.");
}
else
{
await ForceUnban(client);
}
}
else
{
ColoredConsoleWrite(Color.Red, "Please start the bot before trying to force unban");
}
}
=======
private void showAllToolStripMenuItem2_Click(object sender, EventArgs e)
{
}
private void todoToolStripMenuItem_Click(object sender, EventArgs e)
{
SettingsForm settingsForm = new SettingsForm();
settingsForm.Show();
}
private void pokemonToolStripMenuItem2_Click(object sender, EventArgs e)
{
var pForm = new PokeUi();
pForm.Show();
}
>>>>>>>
private async void forceUnbanToolStripMenuItem_Click(object sender, EventArgs e)
{
if (client != null)
{
if (ForceUnbanning)
{
ColoredConsoleWrite(Color.Red, "A force unban attempt is in action... Please wait.");
}
else
{
await ForceUnban(client);
}
}
else
{
ColoredConsoleWrite(Color.Red, "Please start the bot before trying to force unban");
}
}
private void showAllToolStripMenuItem2_Click(object sender, EventArgs e)
{
}
private void todoToolStripMenuItem_Click(object sender, EventArgs e)
{
SettingsForm settingsForm = new SettingsForm();
settingsForm.Show();
}
private void pokemonToolStripMenuItem2_Click(object sender, EventArgs e)
{
var pForm = new PokeUi();
pForm.Show();
} |
<<<<<<<
=======
>>>>>>>
<<<<<<<
using Microsoft.Practices.ServiceLocation;
=======
using SubSonic.SqlGeneration;
using SubSonic.Linq.Structure;
>>>>>>>
using SubSonic.SqlGeneration;
using SubSonic.Linq.Structure; |
<<<<<<<
using SubSonic.DataProviders;
=======
>>>>>>> |
<<<<<<<
///
=======
>>>>>>> |
<<<<<<<
internal override Executable ResolveEntityNames(ParserContext parser)
{
this.BatchExecutableEntityNameResolver(parser, this.Code);
this.Condition = this.Condition.ResolveEntityNames(parser);
return this;
}
internal override void ResolveTypes(ParserContext parser, TypeResolver typeResolver)
{
throw new System.NotImplementedException();
}
=======
>>>>>>>
internal override void ResolveTypes(ParserContext parser, TypeResolver typeResolver)
{
throw new System.NotImplementedException();
} |
<<<<<<<
=======
>>>>>>> |
<<<<<<<
[TableName("Person")]
[ObjectFactory(typeof(TestPersonObject.Factory))]
public class TestPersonObject
{
public class Factory : IObjectFactory
{
#region IObjectFactory Members
public object CreateInstance(TypeAccessor typeAccessor, InitContext context)
{
if (context == null)
throw new Exception("InitContext is null while mapping from DataReader!");
return typeAccessor.CreateInstance();
}
#endregion
}
public int PersonID;
public string FirstName;
}
[Test]
public void ObjectFactoryTest()
{
ForEachProvider(db =>
db.GetTable<TestPersonObject>().ToList());
}
=======
[Test]
public void ProjectionTest2()
{
ForEachProvider(db => AreEqual(
from p in Person select p.Patient,
from p in db.Person select p.Patient));
}
[Test]
public void EqualTest1()
{
ForEachProvider(db =>
{
var q = (from p in db.Parent select new { p1 = p, p2 = p }).First();
Assert.AreSame(q.p1, q.p2);
});
}
>>>>>>>
[TableName("Person")]
[ObjectFactory(typeof(TestPersonObject.Factory))]
public class TestPersonObject
{
public class Factory : IObjectFactory
{
#region IObjectFactory Members
public object CreateInstance(TypeAccessor typeAccessor, InitContext context)
{
if (context == null)
throw new Exception("InitContext is null while mapping from DataReader!");
return typeAccessor.CreateInstance();
}
#endregion
}
public int PersonID;
public string FirstName;
}
[Test]
public void ObjectFactoryTest()
{
ForEachProvider(db =>
db.GetTable<TestPersonObject>().ToList());
}
[Test]
public void ProjectionTest2()
{
ForEachProvider(db => AreEqual(
from p in Person select p.Patient,
from p in db.Person select p.Patient));
}
[Test]
public void EqualTest1()
{
ForEachProvider(db =>
{
var q = (from p in db.Parent select new { p1 = p, p2 = p }).First();
Assert.AreSame(q.p1, q.p2);
});
} |
<<<<<<<
public struct NullableObjectId
{
public NullableObjectId(int? value)
{
m_value = value;
}
private int? m_value;
public int? Value
{
get { return m_value; }
set { m_value = value; }
}
public static implicit operator int?(NullableObjectId val)
{
return val.m_value;
}
}
=======
>>>>>>>
public struct NullableObjectId
{
public NullableObjectId(int? value)
{
m_value = value;
}
private int? m_value;
public int? Value
{
get { return m_value; }
set { m_value = value; }
}
public static implicit operator int?(NullableObjectId val)
{
return val.m_value;
}
}
<<<<<<<
select
new
{
NullableId = new NullableObjectId { Value = child.ChildID }
};
=======
select
new
{
NullableId = new ObjectId { Value = child.ChildID }
};
>>>>>>>
select
new
{
NullableId = new NullableObjectId { Value = child.ChildID }
}; |
<<<<<<<
[TestCase("--skipnontestassemblies", "SkipNonTestAssemblies", true)]
=======
[TestCase("--set-principal-policy:UnauthenticatedPrincipal", "PrincipalPolicy", "UnauthenticatedPrincipal")]
>>>>>>>
[TestCase("--skipnontestassemblies", "SkipNonTestAssemblies", true)]
[TestCase("--set-principal-policy:UnauthenticatedPrincipal", "PrincipalPolicy", "UnauthenticatedPrincipal")] |
<<<<<<<
public abstract void NotifyUserConfirmation(UserConfirmation confirmation);
// Note: in PlatformCrashes we use only callbacks; not events (in Crashes, there are some corresponding events)
public abstract SendingErrorReportHandler SendingErrorReport { get; set; }
public abstract SentErrorReportHandler SentErrorReport { get; set; }
public abstract FailedToSendErrorHandler FailedToSendErrorReport { get; set; }
=======
// Note: in PlatformCrashes we use only callbacks; not events (in Crashes, there are some corresponding events)
public abstract SendingErrorReportEventHandler SendingErrorReport { get; set; }
public abstract SentErrorReportEventHandler SentErrorReport { get; set; }
public abstract FailedToSendErrorReportEventHandler FailedToSendErrorReport { get; set; }
>>>>>>>
public abstract void NotifyUserConfirmation(UserConfirmation confirmation);
// Note: in PlatformCrashes we use only callbacks; not events (in Crashes, there are some corresponding events)
public abstract SendingErrorReportEventHandler SendingErrorReport { get; set; }
public abstract SentErrorReportEventHandler SentErrorReport { get; set; }
public abstract FailedToSendErrorReportEventHandler FailedToSendErrorReport { get; set; } |
<<<<<<<
/// <summary>
/// This property controls the amount of logs emitted by the SDK.
/// </summary>
public static LogLevel LogLevel
{
get
{
return PlatformLogLevel;
}
set
{
PlatformLogLevel = value;
}
}
/// <summary>
/// Check whether the SDK is enabled or not as a whole.
/// </summary>
/// <returns>A task with result being true if enabled, false if disabled.</returns>
public static Task<bool> IsEnabledAsync()
{
return PlatformIsEnabledAsync();
}
/// <summary>
/// Enable or disable the SDK as a whole.
/// Updating the state propagates the value to all services that have been started.
/// </summary>
public static void SetEnabled(bool enabled)
{
PlatformSetEnabled(enabled);
}
/// <summary>
/// Get the unique installation identifier for this application installation on this device.
/// </summary>
/// <remarks>
/// The identifier is lost if clearing application data or uninstalling application.
/// </remarks>
public static Task<Guid?> GetInstallIdAsync()
{
return PlatformGetInstallIdAsync();
}
/// <summary>
/// Change the base URL (scheme + authority + port only) used to communicate with the backend.
/// </summary>
/// <param name="logUrl">Base URL to use for server communication.</param>
public static void SetLogUrl(string logUrl)
{
PlatformSetLogUrl(logUrl);
}
/// <summary>
/// Check whether SDK has already been configured or not.
/// </summary>
public static bool Configured => PlatformConfigured;
/// <summary>
/// Configure the SDK.
/// This may be called only once per application process lifetime.
/// </summary>
/// <param name="appSecret">A unique and secret key used to identify the application.</param>
public static void Configure(string appSecret)
{
PlatformConfigure(appSecret);
}
/// <summary>
/// Start services.
/// This may be called only once per service per application process lifetime.
/// </summary>
/// <param name="services">List of services to use.</param>
public static void Start(params Type[] services)
{
PlatformStart(services);
}
/// <summary>
/// Initialize the SDK with the list of services to start.
/// This may be called only once per application process lifetime.
/// </summary>
/// <param name="appSecret">A unique and secret key used to identify the application.</param>
/// <param name="services">List of services to use.</param>
public static void Start(string appSecret, params Type[] services)
{
PlatformStart(appSecret, services);
}
=======
/// <summary>
/// Set the custom properties.
/// </summary>
/// <param name="customProperties">Custom properties object.</param>
public static void SetCustomProperties(CustomProperties customProperties)
{
PlatformSetCustomProperties(customProperties);
}
>>>>>>>
/// <summary>
/// This property controls the amount of logs emitted by the SDK.
/// </summary>
public static LogLevel LogLevel
{
get
{
return PlatformLogLevel;
}
set
{
PlatformLogLevel = value;
}
}
/// <summary>
/// Check whether the SDK is enabled or not as a whole.
/// </summary>
/// <returns>A task with result being true if enabled, false if disabled.</returns>
public static Task<bool> IsEnabledAsync()
{
return PlatformIsEnabledAsync();
}
/// <summary>
/// Enable or disable the SDK as a whole.
/// Updating the state propagates the value to all services that have been started.
/// </summary>
public static void SetEnabled(bool enabled)
{
PlatformSetEnabled(enabled);
}
/// <summary>
/// Get the unique installation identifier for this application installation on this device.
/// </summary>
/// <remarks>
/// The identifier is lost if clearing application data or uninstalling application.
/// </remarks>
public static Task<Guid?> GetInstallIdAsync()
{
return PlatformGetInstallIdAsync();
}
/// <summary>
/// Change the base URL (scheme + authority + port only) used to communicate with the backend.
/// </summary>
/// <param name="logUrl">Base URL to use for server communication.</param>
public static void SetLogUrl(string logUrl)
{
PlatformSetLogUrl(logUrl);
}
/// <summary>
/// Check whether SDK has already been configured or not.
/// </summary>
public static bool Configured => PlatformConfigured;
/// <summary>
/// Configure the SDK.
/// This may be called only once per application process lifetime.
/// </summary>
/// <param name="appSecret">A unique and secret key used to identify the application.</param>
public static void Configure(string appSecret)
{
PlatformConfigure(appSecret);
}
/// <summary>
/// Start services.
/// This may be called only once per service per application process lifetime.
/// </summary>
/// <param name="services">List of services to use.</param>
public static void Start(params Type[] services)
{
PlatformStart(services);
}
/// <summary>
/// Initialize the SDK with the list of services to start.
/// This may be called only once per application process lifetime.
/// </summary>
/// <param name="appSecret">A unique and secret key used to identify the application.</param>
/// <param name="services">List of services to use.</param>
public static void Start(string appSecret, params Type[] services)
{
PlatformStart(appSecret, services);
}
/// Set the custom properties.
/// </summary>
/// <param name="customProperties">Custom properties object.</param>
public static void SetCustomProperties(CustomProperties customProperties)
{
PlatformSetCustomProperties(customProperties);
} |
<<<<<<<
// Setup auth type dropdown choices
foreach (var authType in AuthTypeUtils.GetAuthTypeChoiceStrings())
{
this.AuthTypePicker.Items.Add(authType);
}
this.AuthTypePicker.SelectedIndex = (int)(AuthTypeUtils.GetPersistedAuthType());
// Setup track update dropdown choices.
foreach (var trackUpdateType in TrackUpdateUtils.GetUpdateTrackChoiceStrings())
{
this.UpdateTrackPicker.Items.Add(trackUpdateType);
}
UpdateTrackPicker.SelectedIndex = TrackUpdateUtils.ToPickerUpdateTrackIndex(TrackUpdateUtils.GetPersistedUpdateTrack());
// Setup when update dropdown choices.
foreach (var setupTimeType in TrackUpdateUtils.GetUpdateTrackTimeChoiceStrings())
{
this.UpdateTrackTimePicker.Items.Add(setupTimeType);
}
UpdateTrackTimePicker.SelectedIndex = (int)(TrackUpdateUtils.GetPersistedUpdateTrackTime());
=======
>>>>>>>
// Setup track update dropdown choices.
foreach (var trackUpdateType in TrackUpdateUtils.GetUpdateTrackChoiceStrings())
{
this.UpdateTrackPicker.Items.Add(trackUpdateType);
}
UpdateTrackPicker.SelectedIndex = TrackUpdateUtils.ToPickerUpdateTrackIndex(TrackUpdateUtils.GetPersistedUpdateTrack());
// Setup when update dropdown choices.
foreach (var setupTimeType in TrackUpdateUtils.GetUpdateTrackTimeChoiceStrings())
{
this.UpdateTrackTimePicker.Items.Add(setupTimeType);
}
UpdateTrackTimePicker.SelectedIndex = (int)(TrackUpdateUtils.GetPersistedUpdateTrackTime()); |
<<<<<<<
using System.IO;
=======
using System;
>>>>>>>
using System;
using System.IO;
<<<<<<<
Crashes.GetErrorAttachments = (ErrorReport report) =>
{
byte[] fileContent = null;
var fileName = new FileInfo(Settings.Default.FileErrorAttachments).Name;
var mimeType = "";
if (File.Exists(Settings.Default.FileErrorAttachments))
{
mimeType = MimeMapping.GetMimeMapping(Settings.Default.FileErrorAttachments);
fileContent = File.ReadAllBytes(Settings.Default.FileErrorAttachments);
}
return new ErrorAttachmentLog[]
{
ErrorAttachmentLog.AttachmentWithText(Settings.Default.TextErrorAttachments, "text.txt"),
ErrorAttachmentLog.AttachmentWithBinary(fileContent, fileName, mimeType)
};
};
=======
Crashes.SendingErrorReport += (sender, args) => Console.WriteLine($@"[App] Sending report Id={args.Report.Id} Exception={args.Report.Exception}");
Crashes.SentErrorReport += (sender, args) => Console.WriteLine($@"[App] Sent report Id={args.Report.Id}");
Crashes.FailedToSendErrorReport += (sender, args) => Console.WriteLine($@"[App] FailedToSend report Id={args.Report.Id} Error={args.Exception}");
>>>>>>>
Crashes.GetErrorAttachments = (ErrorReport report) =>
{
byte[] fileContent = null;
var fileName = new FileInfo(Settings.Default.FileErrorAttachments).Name;
var mimeType = "";
if (File.Exists(Settings.Default.FileErrorAttachments))
{
mimeType = MimeMapping.GetMimeMapping(Settings.Default.FileErrorAttachments);
fileContent = File.ReadAllBytes(Settings.Default.FileErrorAttachments);
}
return new ErrorAttachmentLog[]
{
ErrorAttachmentLog.AttachmentWithText(Settings.Default.TextErrorAttachments, "text.txt"),
ErrorAttachmentLog.AttachmentWithBinary(fileContent, fileName, mimeType)
};
};
Crashes.SendingErrorReport += (sender, args) => Console.WriteLine($@"[App] Sending report Id={args.Report.Id} Exception={args.Report.Exception}");
Crashes.SentErrorReport += (sender, args) => Console.WriteLine($@"[App] Sent report Id={args.Report.Id}");
Crashes.FailedToSendErrorReport += (sender, args) => Console.WriteLine($@"[App] FailedToSend report Id={args.Report.Id} Error={args.Exception}"); |
<<<<<<<
/// Set this callback to add custom behavior for determining whether user confirmation is required to send
/// error reports.
/// </summary>
/// <seealso cref="ShouldAwaitUserConfirmationCallback"/>
public static ShouldAwaitUserConfirmationCallback ShouldAwaitUserConfirmation
{
set
{
PlatformCrashes.ShouldAwaitUserConfirmation = value;
}
}
/// <summary>
/// Set this callback to add custom behavior for associating an error attachment with an error report.
=======
/// Set this callback to attach custom text and/or binaries to an error report.
>>>>>>>
/// Set this callback to add custom behavior for determining whether user confirmation is required to send
/// error reports.
/// </summary>
/// <seealso cref="ShouldAwaitUserConfirmationCallback"/>
public static ShouldAwaitUserConfirmationCallback ShouldAwaitUserConfirmation
{
set
{
PlatformCrashes.ShouldAwaitUserConfirmation = value;
}
}
/// <summary>
/// Set this callback to attach custom text and/or binaries to an error report. |
<<<<<<<
Distribute.WillExitApp = OnWillExitApp;
=======
Distribute.NoReleaseAvailable = OnNoReleaseAvailable;
>>>>>>>
Distribute.WillExitApp = OnWillExitApp;
Distribute.NoReleaseAvailable = OnNoReleaseAvailable;
<<<<<<<
void OnWillExitApp()
{
AppCenterLog.Info(LogTag, "App will close callback invoked.");
}
=======
void OnNoReleaseAvailable()
{
AppCenterLog.Info(LogTag, "No release available callback invoked.");
}
>>>>>>>
void OnWillExitApp()
{
AppCenterLog.Info(LogTag, "App will close callback invoked.");
}
void OnNoReleaseAvailable()
{
AppCenterLog.Info(LogTag, "No release available callback invoked.");
} |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.