conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
if (Faction.Threats.Where(threat => !threat.IsDead).Sum(threat => (threat.AI.Position - Position).Length() < 6.0f ? 1 : 0) -
Faction.Minions.Where(minion => !minion.IsDead).Sum(minion => (minion.Position - Position).Length() < 6.0f ? 1 : 0) > Creature.Stats.Constitution)
=======
if (Faction.Threats.Where(threat => threat != null && threat.AI != null && !threat.IsDead).Sum(threat => (threat.AI.Position - Position).Length() < 6.0f ? 1 : 0) -
Faction.Minions.Where(minion => minion != null && !minion.IsDead).Sum(minion => (minion.Position - Position).Length() < 6.0f ? 1 : 0) > Creature.Stats.BuffedCon)
>>>>>>>
if (Faction.Threats.Where(threat => threat != null && threat.AI != null && !threat.IsDead).Sum(threat => (threat.AI.Position - Position).Length() < 6.0f ? 1 : 0) -
Faction.Minions.Where(minion => minion != null && !minion.IsDead).Sum(minion => (minion.Position - Position).Length() < 6.0f ? 1 : 0) > Creature.Stats.Constitution) |
<<<<<<<
public static WorldManager World { get { return DwarfGame.World; } }
=======
public WorldManager World { get; set; }
>>>>>>>
public static WorldManager World { get; set; }
<<<<<<<
public static bool Paused
=======
public bool Paused
>>>>>>>
public bool Paused
<<<<<<<
GuiRoot = new Gum.Root(new Point(640, 480), DwarfGame.GumSkin);
GuiRoot.MousePointer = new Gum.MousePointer("mouse", 4, 0);
DwarfGame.World.NewGui = GuiRoot;
=======
NewGui = new Gum.Root(new Point(640, 480), DwarfGame.GumSkin);
NewGui.MousePointer = new Gum.MousePointer("mouse", 4, 0);
World.NewGui = NewGui;
>>>>>>>
GuiRoot = new Gum.Root(new Point(640, 480), DwarfGame.GumSkin);
GuiRoot.MousePointer = new Gum.MousePointer("mouse", 4, 0);
World.NewGui = GuiRoot;
<<<<<<<
AutoLayout = global::Gum.AutoLayout.None,
CompanyInformation = DwarfGame.World.PlayerCompany.Information
=======
AutoLayout = Gum.AutoLayout.None,
CompanyInformation = World.PlayerCompany.Information
>>>>>>>
AutoLayout = Gum.AutoLayout.None,
CompanyInformation = World.PlayerCompany.Information
<<<<<<<
Text = DwarfGame.World.PlayerCompany.Information.Name,
AutoLayout = global::Gum.AutoLayout.None,
=======
Text = World.PlayerCompany.Information.Name,
AutoLayout = Gum.AutoLayout.None,
>>>>>>>
Text = World.PlayerCompany.Information.Name,
AutoLayout = Gum.AutoLayout.None,
<<<<<<<
sender.Rect.X -= 8;
sender.Rect.Y -= 8;
},
OnSpeedChanged = (sender, speed) =>
{
DwarfTime.LastTime.Speed = (float)speed;
PlayState.Paused = speed == 0;
}
}) as NewGui.GameSpeedControls;
=======
AutoLayout = Gum.AutoLayout.None,
OnLayout = (sender) =>
{
// Want to position this directly above the bottom-right tray.
sender.Rect = new Rectangle(BottomRightTray.Rect.Right - sender.MinimumSize.X,
BottomRightTray.Rect.Top - sender.MinimumSize.Y, sender.MinimumSize.X, sender.MinimumSize.Y);
},
PlayState = this
}) as NewGui.GameSpeedControls;
>>>>>>>
sender.Rect.X -= 8;
sender.Rect.Y -= 8;
},
OnSpeedChanged = (sender, speed) =>
{
DwarfTime.LastTime.Speed = (float)speed;
Paused = speed == 0;
}
}) as NewGui.GameSpeedControls;
<<<<<<<
Master.ChangeTool(GameMaster.ToolMode.SelectUnits);
//ToolbarItems[Master.CurrentToolMode].OnClick(null, null);
=======
Gum.Widget currentTool;
if (!ToolbarItems.TryGetValue(Master.CurrentToolMode, out currentTool))
{
currentTool = ToolbarItems[GameMaster.ToolMode.SelectUnits];
}
currentTool.OnClick(null, null);
>>>>>>>
Master.ChangeTool(GameMaster.ToolMode.SelectUnits); |
<<<<<<<
=======
if (flags.turnOnRedAllowed != null && IsNearTurnOnRedAllowedConfigurable(segNodeConf.segmentId, false, ref node)) {
SetNearTurnOnRedAllowed(segNodeConf.segmentId, false, (bool)flags.turnOnRedAllowed);
}
if (flags.farTurnOnRedAllowed != null && IsFarTurnOnRedAllowedConfigurable(segNodeConf.segmentId, false, ref node)) {
SetFarTurnOnRedAllowed(segNodeConf.segmentId, false, (bool)flags.farTurnOnRedAllowed);
}
>>>>>>>
if (flags.turnOnRedAllowed != null && IsNearTurnOnRedAllowedConfigurable(segNodeConf.segmentId, false, ref node)) {
SetNearTurnOnRedAllowed(segNodeConf.segmentId, false, (bool)flags.turnOnRedAllowed);
}
if (flags.farTurnOnRedAllowed != null && IsFarTurnOnRedAllowedConfigurable(segNodeConf.segmentId, false, ref node)) {
SetFarTurnOnRedAllowed(segNodeConf.segmentId, false, (bool)flags.farTurnOnRedAllowed);
} |
<<<<<<<
public WorkFence(ComponentManager componentManager, Vector3 position, float orientation) :
base(componentManager, position, new SpriteSheet(ContentPaths.Entities.DwarfObjects.constructiontape, 32, 32), new Point(0, 0))
=======
public Fence(ComponentManager componentManager, Vector3 position, float orientation, string asset) :
base(position, new SpriteSheet(asset, 32, 32), new Point(0, 0), componentManager.RootComponent)
>>>>>>>
public Fence(ComponentManager componentManager, Vector3 position, float orientation, string asset) :
base(componentManager, position, new SpriteSheet(asset, 32, 32), new Point(0, 0)) |
<<<<<<<
VoxelChunk.CreateFaceDrawMap();
StaticInitialized = true;
=======
VertexNeighbors2D[(int)VoxelVertex.FrontTopLeft] = new List<Vector3>()
{
new Vector3(-1, 0, 0),
new Vector3(-1, 0, 1),
new Vector3(0, 0, 1)
};
VertexNeighbors2D[(int)VoxelVertex.FrontTopRight] = new List<Vector3>()
{
new Vector3(0, 0, 1),
new Vector3(1, 0, 1),
new Vector3(1, 0, 0)
};
VertexNeighbors2D[(int)VoxelVertex.BackTopLeft] = new List<Vector3>()
{
new Vector3(-1, 0, 0),
new Vector3(-1, 0, -1),
new Vector3(0, 0, -1)
};
VertexNeighbors2D[(int)VoxelVertex.BackTopRight] = new List<Vector3>()
{
new Vector3(0, 0, -1),
new Vector3(1, 0, -1),
new Vector3(1, 0, 0)
};
VoxelChunk.CreateFaceDrawMap();
StaticsInitialized = true;
>>>>>>>
VoxelChunk.CreateFaceDrawMap();
StaticsInitialized = true;
<<<<<<<
=======
VoxelHandle v = chunk.MakeVoxel(0, 0, 0);
VoxelHandle voxelOnFace = chunk.MakeVoxel(0, 0, 0);
VoxelHandle worldVoxel = new VoxelHandle();
VoxelHandle[] manhattanNeighbors = new VoxelHandle[4];
>>>>>>>
<<<<<<<
=======
List<VoxelHandle> lightingScratchSpace = new List<VoxelHandle>(8);
int totalFaces = 6;
>>>>>>>
<<<<<<<
VoxelChunk.CalculateVertexLight(v, bestKey, chunk.Manager, ref colorInfo);
=======
VoxelChunk.CalculateVertexLight(v, currentVertex, chunk.Manager, lightingScratchSpace, ref colorInfo);
>>>>>>>
VoxelChunk.CalculateVertexLight(v, currentVertex, chunk.Manager, ref colorInfo);
<<<<<<<
if(v.Type.CanRamp && VoxelChunk.ShouldRamp(bestKey, v.RampType))
=======
if (v.Type.CanRamp && VoxelChunk.ShouldRamp(currentVertex, v.RampType))
>>>>>>>
if (v.Type.CanRamp && VoxelChunk.ShouldRamp(currentVertex, v.RampType))
<<<<<<<
Vertices[maxVertex] = new ExtendedVertex(vert.Position + v.WorldPosition +
VertexNoise.GetNoiseVectorFromRepeatingTexture(
vert.Position + v.WorldPosition) + offset,
new Color(colorInfo.SunColor, colorInfo.AmbientColor, colorInfo.DynamicColor),
=======
Vertices[maxVertex] = new ExtendedVertex(
vert.Position + v.Position + offset +
VertexNoise.GetNoiseVectorFromRepeatingTexture(vert.Position + v.Position),
new Color(colorInfo.SunColor, colorInfo.AmbientColor, colorInfo.DynamicColor),
>>>>>>>
Vertices[maxVertex] = new ExtendedVertex(vert.Position + v.WorldPosition +
VertexNoise.GetNoiseVectorFromRepeatingTexture(
vert.Position + v.WorldPosition) + offset,
new Color(colorInfo.SunColor, colorInfo.AmbientColor, colorInfo.DynamicColor),
<<<<<<<
var transitionFrontBack = ComputeTransitionValueOnPlane(
VoxelHelpers.EnumerateManhattanNeighbors2D(V.Coordinate, ChunkManager.SliceMode.Z)
.Select(c => new TemporaryVoxelHandle(Data, c)),
Type);
var transitionLeftRight = ComputeTransitionValueOnPlane(
VoxelHelpers.EnumerateManhattanNeighbors2D(V.Coordinate, ChunkManager.SliceMode.X)
.Select(c => new TemporaryVoxelHandle(Data, c)),
Type);
return new BoxTransition()
{
Front = (TransitionTexture)transitionFrontBack,
Back = (TransitionTexture)transitionFrontBack,
Left = (TransitionTexture)transitionLeftRight,
Right = (TransitionTexture)transitionLeftRight
};
}
}
// Todo: Reorder 2d neighbors to make this unecessary.
private static int[] TransitionMultipliers = new int[] { 2, 8, 4, 1 };
private static int ComputeTransitionValueOnPlane(IEnumerable<TemporaryVoxelHandle> Neighbors, VoxelType Type)
{
int index = 0;
int accumulator = 0;
foreach (var v in Neighbors)
{
if (v.IsValid && !v.IsEmpty && v.Type == Type)
accumulator += TransitionMultipliers[index];
index += 1;
=======
return V.Type.TransitionTextures[V.Chunk.ComputeTransitionValue(
V.Type.Transitions, (int)V.GridPosition.X, (int)V.GridPosition.Y, (int)V.GridPosition.Z, manhattanNeighbors)];
>>>>>>>
var transitionFrontBack = ComputeTransitionValueOnPlane(
VoxelHelpers.EnumerateManhattanNeighbors2D(V.Coordinate, ChunkManager.SliceMode.Z)
.Select(c => new TemporaryVoxelHandle(Data, c)),
Type);
var transitionLeftRight = ComputeTransitionValueOnPlane(
VoxelHelpers.EnumerateManhattanNeighbors2D(V.Coordinate, ChunkManager.SliceMode.X)
.Select(c => new TemporaryVoxelHandle(Data, c)),
Type);
return new BoxTransition()
{
Front = (TransitionTexture)transitionFrontBack,
Back = (TransitionTexture)transitionFrontBack,
Left = (TransitionTexture)transitionLeftRight,
Right = (TransitionTexture)transitionLeftRight
};
}
}
// Todo: Reorder 2d neighbors to make this unecessary.
private static int[] TransitionMultipliers = new int[] { 2, 8, 4, 1 };
private static int ComputeTransitionValueOnPlane(IEnumerable<TemporaryVoxelHandle> Neighbors, VoxelType Type)
{
int index = 0;
int accumulator = 0;
foreach (var v in Neighbors)
{
if (v.IsValid && !v.IsEmpty && v.Type == Type)
accumulator += TransitionMultipliers[index];
index += 1; |
<<<<<<<
=======
SelectionCircle = new SelectionCircle(Manager, Physics)
{
IsVisible = false
};
Inventory = new Inventory("Inventory", Physics)
{
Resources = new ResourceContainer()
{
MaxResources = 128
}
};
>>>>>>> |
<<<<<<<
public BedRoom(bool designation, IEnumerable<VoxelHandle> designations, WorldManager world) :
base(designation, designations, BedRoomData, world)
=======
public BedRoom(bool designation, IEnumerable<Voxel> designations, WorldManager world, Faction faction) :
base(designation, designations, BedRoomData, world, faction)
>>>>>>>
public BedRoom(bool designation, IEnumerable<VoxelHandle> designations, WorldManager world, Faction faction) :
base(designation, designations, BedRoomData, world, faction)
<<<<<<<
public BedRoom(IEnumerable<VoxelHandle> voxels, WorldManager world) :
base(voxels, BedRoomData, world)
=======
public BedRoom(IEnumerable<Voxel> voxels, WorldManager world, Faction faction) :
base(voxels, BedRoomData, world, faction)
>>>>>>>
public BedRoom(IEnumerable<VoxelHandle> voxels, WorldManager world, Faction faction) :
base(voxels, BedRoomData, world, faction) |
<<<<<<<
public CraftItem CraftType { get; set; }
public VoxelHandle Voxel { get; set; }
=======
public CraftBuilder.CraftDesignation Designation { get; set; }
>>>>>>>
public CraftBuilder.CraftDesignation Designation { get; set; }
<<<<<<<
public CraftItemTask(VoxelHandle voxel, CraftItem type)
=======
public CraftItemTask(TemporaryVoxelHandle voxel, CraftBuilder.CraftDesignation type)
>>>>>>>
public CraftItemTask(VoxelHandle voxel, CraftBuilder.CraftDesignation type) |
<<<<<<<
DesignationProperties.Add(DesignationType.Put, new DesignationTypeProperties
{
Color = new Color(1.0f, 0.0f, 0.0f, 1.0f),
DrawType = DesignationTypeProperties.DrawBoxType.PreviewVoxel
});
=======
DesignationProperties.Add(DesignationType.Put, new DesignationTypeProperties
{
Color = new Color(0.5f, 1.0f, 0.5f, 0.5f),
DrawType = DesignationTypeProperties.DrawBoxType.PreviewVoxel
});
>>>>>>>
DesignationProperties.Add(DesignationType.Put, new DesignationTypeProperties
{
Color = new Color(0.5f, 1.0f, 0.5f, 0.5f),
DrawType = DesignationTypeProperties.DrawBoxType.PreviewVoxel
});
<<<<<<<
// Todo: Can this be drawn by the entity, allowing it to be properly frustrum culled?
// - Need to add a 'gestating' entity state to the alive/dead/active mess.
=======
>>>>>>>
// Todo: Can this be drawn by the entity, allowing it to be properly frustrum culled?
// - Need to add a 'gestating' entity state to the alive/dead/active mess.
<<<<<<<
=======
if (props.Icon != null)
Drawer2D.DrawSprite(props.Icon, entity.Body.Position + Vector3.One * 0.5f, Vector2.One * 0.5f, Vector2.Zero, new Color(255, 255, 255, 100));
>>>>>>> |
<<<<<<<
public CraftItem ItemType { get; set; }
public VoxelHandle Location { get; set; }
public Body WorkPile { get; set; }
=======
public CraftItem ItemType;
public TemporaryVoxelHandle Location;
public Body WorkPile;
public bool OverrideOrientation;
public float Orientation;
public bool Valid;
>>>>>>>
public CraftItem ItemType;
public VoxelHandle Location;
public Body WorkPile;
public bool OverrideOrientation;
public float Orientation;
public bool Valid;
<<<<<<<
Location = VoxelHandle.InvalidHandle
=======
Location = TemporaryVoxelHandle.InvalidHandle,
Valid = true
>>>>>>>
Location = VoxelHandle.InvalidHandle,
Valid = true |
<<<<<<<
=======
private Widget PausedWidget;
private Gum.Widget ResourcePanel;
>>>>>>>
private Widget PausedWidget;
<<<<<<<
Master.Faction.RoomBuilder.CurrentRoomData = null;
Master.VoxSelector.SelectionType = VoxelSelectionType.SelectEmpty;
Master.Faction.WallBuilder.CurrentVoxelType = null;
Master.Faction.CraftBuilder.IsEnabled = true;
Master.Faction.CraftBuilder.CurrentCraftType = data;
ChangeTool(GameMaster.ToolMode.Build);
World.ShowToolPopup("Click and drag to build " + data.Name);
},
OnConstruct = (sender) =>
{
ToolbarItems.Add(new ToolbarItem(sender, () =>
((sender as NewGui.ToolTray.Icon).ExpansionChild as NewGui.BuildCraftInfo).CanBuild()));
=======
List<Task> assignments = new List<Task> {new CraftResourceTask(data)};
var minions = Faction.FilterMinionsWithCapability(Master.SelectedMinions,
GameMaster.ToolMode.Craft);
if (minions.Count > 0)
{
TaskManager.AssignTasks(assignments, minions);
World.ShowToolPopup(data.CurrentVerb + " one " + data.Name);
}
},
OnConstruct = (sender) =>
{
ToolbarItems.Add(new ToolbarItem(sender, () =>
((sender as NewGui.ToolTray.Icon).ExpansionChild as NewGui.BuildCraftInfo).CanBuild()));
>>>>>>>
List<Task> assignments = new List<Task> {new CraftResourceTask(data)};
var minions = Faction.FilterMinionsWithCapability(Master.SelectedMinions,
GameMaster.ToolMode.Craft);
if (minions.Count > 0)
{
TaskManager.AssignTasks(assignments, minions);
World.ShowToolPopup(data.CurrentVerb + " one " + data.Name);
}
},
OnConstruct = (sender) =>
{
ToolbarItems.Add(new ToolbarItem(sender, () =>
((sender as NewGui.ToolTray.Icon).ExpansionChild as NewGui.BuildCraftInfo).CanBuild()));
<<<<<<<
Master.Faction.RoomBuilder.CurrentRoomData = null;
Master.VoxSelector.SelectionType = VoxelSelectionType.SelectEmpty;
Master.Faction.WallBuilder.CurrentVoxelType = null;
Master.Faction.CraftBuilder.IsEnabled = true;
Master.Faction.CraftBuilder.CurrentCraftType = data;
ChangeTool(GameMaster.ToolMode.Build);
World.ShowToolPopup("Click and drag to build " + data.Name);
},
OnConstruct = (sender) =>
{
ToolbarItems.Add(new ToolbarItem(sender, () =>
((sender as NewGui.ToolTray.Icon).ExpansionChild as NewGui.BuildCraftInfo).CanBuild()));
=======
List<Task> assignments = new List<Task> {new CraftResourceTask(data)};
var minions = Faction.FilterMinionsWithCapability(Master.SelectedMinions,
GameMaster.ToolMode.Cook);
if (minions.Count > 0)
{
TaskManager.AssignTasks(assignments, minions);
World.ShowToolPopup(data.CurrentVerb + " one " + data.Name);
}
},
OnConstruct = (sender) =>
{
ToolbarItems.Add(new ToolbarItem(sender, () =>
((sender as NewGui.ToolTray.Icon).ExpansionChild as NewGui.BuildCraftInfo).CanBuild()));
>>>>>>>
List<Task> assignments = new List<Task> {new CraftResourceTask(data)};
var minions = Faction.FilterMinionsWithCapability(Master.SelectedMinions,
GameMaster.ToolMode.Cook);
if (minions.Count > 0)
{
TaskManager.AssignTasks(assignments, minions);
World.ShowToolPopup(data.CurrentVerb + " one " + data.Name);
}
},
OnConstruct = (sender) =>
{
ToolbarItems.Add(new ToolbarItem(sender, () =>
((sender as NewGui.ToolTray.Icon).ExpansionChild as NewGui.BuildCraftInfo).CanBuild())); |
<<<<<<<
#endif
CustomLaneSpeedLimitIndexByNetInfoName[childNetInfoName] = customSpeedLimitIndex;
=======
CustomLaneSpeedLimitByNetInfoName[childNetInfoName] = customSpeedLimit;
>>>>>>>
#endif
CustomLaneSpeedLimitByNetInfoName[childNetInfoName] = customSpeedLimit;
<<<<<<<
#if DEBUGLOAD
Log._Debug($"SpeedLimitManager.LoadData: Skipping lane {laneSpeedLimit.laneId}: Lane is invalid");
#endif
=======
Log._Debug($"SpeedLimitManager.LoadData: Skipping lane {laneSpeedLimit.laneId}: " +
$"Lane is invalid");
>>>>>>>
#if DEBUGLOAD
Log._Debug($"SpeedLimitManager.LoadData: Skipping lane {laneSpeedLimit.laneId}: Lane is invalid");
#endif
<<<<<<<
int customSpeedLimitIndex = GetCustomNetInfoSpeedLimitIndex(info);
#if DEBUGLOAD
Log._Debug($"SpeedLimitManager.LoadData: Handling lane {laneSpeedLimit.laneId}: Custom speed limit index of segment {segmentId} info ({info}, name={info?.name}, lanes={info?.m_lanes} is {customSpeedLimitIndex}");
#endif
if (customSpeedLimitIndex < 0 || AvailableSpeedLimits[customSpeedLimitIndex] != laneSpeedLimit.speedLimit) {
=======
var customSpeedLimit = GetCustomNetInfoSpeedLimit(info);
Log._Debug($"SpeedLimitManager.LoadData: Handling lane {laneSpeedLimit.laneId}: " +
$"Custom speed limit of segment {segmentId} info ({info}, name={info?.name}, " +
$"lanes={info?.m_lanes} is {customSpeedLimit}");
if (SpeedLimit.IsValidRange(customSpeedLimit)) {
>>>>>>>
var customSpeedLimit = GetCustomNetInfoSpeedLimit(info);
#if DEBUGLOAD
Log._Debug($"SpeedLimitManager.LoadData: Handling lane {laneSpeedLimit.laneId}: " +
$"Custom speed limit of segment {segmentId} info ({info}, name={info?.name}, " +
$"lanes={info?.m_lanes} is {customSpeedLimit}");
#endif
if (SpeedLimit.IsValidRange(customSpeedLimit)) {
<<<<<<<
#if DEBUGLOAD
Log._Debug($"SpeedLimitManager.LoadData: Loading lane speed limit: lane {laneSpeedLimit.laneId} = {laneSpeedLimit.speedLimit}");
#endif
Flags.setLaneSpeedLimit(laneSpeedLimit.laneId, laneSpeedLimit.speedLimit);
=======
Log._Debug($"SpeedLimitManager.LoadData: Loading lane speed limit: " +
$"lane {laneSpeedLimit.laneId} = {laneSpeedLimit.speedLimit} km/h");
var kmph = laneSpeedLimit.speedLimit / SpeedLimit.SPEED_TO_KMPH; // convert to game units
Flags.setLaneSpeedLimit(laneSpeedLimit.laneId, kmph);
>>>>>>>
#if DEBUGLOAD
Log._Debug($"SpeedLimitManager.LoadData: Loading lane speed limit: lane {laneSpeedLimit.laneId} = {laneSpeedLimit.speedLimit}");
#endif
Flags.setLaneSpeedLimit(laneSpeedLimit.laneId, laneSpeedLimit.speedLimit);
Log._Debug($"SpeedLimitManager.LoadData: Loading lane speed limit: " +
$"lane {laneSpeedLimit.laneId} = {laneSpeedLimit.speedLimit} km/h");
var kmph = laneSpeedLimit.speedLimit / SpeedLimit.SPEED_TO_KMPH; // convert to game units
Flags.setLaneSpeedLimit(laneSpeedLimit.laneId, kmph);
<<<<<<<
#if DEBUGLOAD
Log._Debug($"SpeedLimitManager.LoadData: Skipping lane speed limit of lane {laneSpeedLimit.laneId} ({laneSpeedLimit.speedLimit})");
#endif
=======
Log._Debug($"SpeedLimitManager.LoadData: " +
$"Skipping lane speed limit of lane {laneSpeedLimit.laneId} " +
$"({laneSpeedLimit.speedLimit} km/h)");
>>>>>>>
#if DEBUGLOAD
Log._Debug($"SpeedLimitManager.LoadData: " +
$"Skipping lane speed limit of lane {laneSpeedLimit.laneId} " +
$"({laneSpeedLimit.speedLimit} km/h)");
#endif
<<<<<<<
Configuration.LaneSpeedLimit laneSpeedLimit = new Configuration.LaneSpeedLimit(e.Key, e.Value);
#if DEBUGSAVE
Log._Debug($"Saving speed limit of lane {laneSpeedLimit.laneId}: {laneSpeedLimit.speedLimit}");
#endif
=======
var laneSpeedLimit = new Configuration.LaneSpeedLimit(e.Key, e.Value);
Log._Debug($"Saving speed limit of lane {laneSpeedLimit.laneId}: " +
$"{laneSpeedLimit.speedLimit*SpeedLimit.SPEED_TO_KMPH} km/h");
>>>>>>>
var laneSpeedLimit = new Configuration.LaneSpeedLimit(e.Key, e.Value);
#if DEBUGSAVE
Log._Debug($"Saving speed limit of lane {laneSpeedLimit.laneId}: " +
$"{laneSpeedLimit.speedLimit*SpeedLimit.SPEED_TO_KMPH} km/h");
#endif |
<<<<<<<
public WorldManager WorldManager { get; set; }
=======
public static WorldManager World { get; set; }
>>>>>>>
public static WorldManager WorldManager { get; set; }
<<<<<<<
WorldManager = new WorldManager(game);
WorldManager.gameState = this;
WorldManager.OnLoadedEvent += World_OnLoadedEvent;
WorldManager.OnLoseEvent += World_OnLoseEvent;
=======
//World = new WorldManager(game);
//World.gameState = this;
//World.OnLoadedEvent += World_OnLoadedEvent;
//World.OnLoseEvent += World_OnLoseEvent;
>>>>>>>
//World = new WorldManager(game);
//World.gameState = this;
//World.OnLoadedEvent += World_OnLoadedEvent;
//World.OnLoseEvent += World_OnLoseEvent;
<<<<<<<
if (ShouldReset)
{
IsInitialized = false;
ShouldReset = false;
CreateGUI();
WorldManager.Setup(GUI);
}
else
{
=======
//if (ShouldReset)
//{
// IsInitialized = false;
// ShouldReset = false;
// CreateGUI();
// World.Setup(GUI);
//}
//else
//{
>>>>>>>
//if (ShouldReset)
//{
// IsInitialized = false;
// ShouldReset = false;
// CreateGUI();
// World.Setup(GUI);
//}
//else
//{
<<<<<<<
WorldManager.Unpause();
}
=======
World.Unpause();
//}
>>>>>>>
WorldManager.Unpause();
//}
<<<<<<<
WorldManager.Quit();
StateManager.States["PlayState"] = new PlayState(Game, StateManager);
=======
World.Quit();
//StateManager.States["PlayState"] = new PlayState(Game, StateManager);
>>>>>>>
WorldManager.Quit();
//StateManager.States["PlayState"] = new PlayState(Game, StateManager); |
<<<<<<<
#region Setup brush
BrushTray = GuiRoot.RootItem.AddChild(new NewGui.IconTray
{
AutoLayout = AutoLayout.FloatRight,
Rect = new Rectangle(256, 0, 32, 128),
SizeToGrid = new Point(1, 3),
Border = null,
ItemSource = new Gum.Widget[]
{
new NewGui.FramedIcon
{
Icon = new Gum.TileReference("tool-icons", 29),
DrawFrame = false,
Tooltip = "Block brush",
OnMouseEnter = (widget, args) =>
{
(widget as NewGui.FramedIcon).IconTint = new Vector4(0.99f, 0.9f, 0.8f, 1.0f);
},
OnMouseLeave = (widget, args) =>
{
(widget as NewGui.FramedIcon).IconTint = Vector4.One;
},
OnClick = (widget, args) =>
{
Master.VoxSelector.Brush = VoxelBrush.Box;
},
Enabled = true
},
new NewGui.FramedIcon
{
Icon = new Gum.TileReference("tool-icons", 30),
DrawFrame = false,
Tooltip = "Shell brush",
OnMouseEnter = (widget, args) =>
{
(widget as NewGui.FramedIcon).IconTint = new Vector4(0.99f, 0.9f, 0.8f, 1.0f);
},
OnMouseLeave = (widget, args) =>
{
(widget as NewGui.FramedIcon).IconTint = Vector4.One;
},
OnClick = (widget, args) =>
{
Master.VoxSelector.Brush = VoxelBrush.Shell;
},
Enabled = false
},
new NewGui.FramedIcon
{
Icon = new Gum.TileReference("tool-icons", 31),
DrawFrame = false,
Tooltip = "Stairs brush",
OnMouseEnter = (widget, args) =>
{
(widget as NewGui.FramedIcon).IconTint = new Vector4(0.99f, 0.9f, 0.8f, 1.0f);
},
OnMouseLeave = (widget, args) =>
{
(widget as NewGui.FramedIcon).IconTint = Vector4.One;
},
OnClick = (widget, args) =>
{
Master.VoxSelector.Brush = VoxelBrush.Stairs;
},
Enabled = false
}
},
OnClick = (widget, args) =>
{
var tray = widget as NewGui.IconTray;
var items = tray.Children;
var button0 = items[0] as NewGui.FramedIcon;
var button1 = items[1] as NewGui.FramedIcon;
var button2 = items[2] as NewGui.FramedIcon;
button0.Enabled = Master.VoxSelector.Brush == VoxelBrush.Box;
button1.Enabled = Master.VoxSelector.Brush == VoxelBrush.Shell;
button2.Enabled = Master.VoxSelector.Brush == VoxelBrush.Stairs;
}
}) as NewGui.IconTray;
#endregion
#region Setup bottom right tray
=======
#endregion
>>>>>>>
#region Setup brush
BrushTray = GuiRoot.RootItem.AddChild(new NewGui.IconTray
{
AutoLayout = AutoLayout.FloatRight,
Rect = new Rectangle(256, 0, 32, 128),
SizeToGrid = new Point(1, 3),
Border = null,
ItemSource = new Gum.Widget[]
{
new NewGui.FramedIcon
{
Icon = new Gum.TileReference("tool-icons", 29),
DrawFrame = false,
Tooltip = "Block brush",
OnMouseEnter = (widget, args) =>
{
(widget as NewGui.FramedIcon).IconTint = new Vector4(0.99f, 0.9f, 0.8f, 1.0f);
},
OnMouseLeave = (widget, args) =>
{
(widget as NewGui.FramedIcon).IconTint = Vector4.One;
},
OnClick = (widget, args) =>
{
Master.VoxSelector.Brush = VoxelBrush.Box;
},
Enabled = true
},
new NewGui.FramedIcon
{
Icon = new Gum.TileReference("tool-icons", 30),
DrawFrame = false,
Tooltip = "Shell brush",
OnMouseEnter = (widget, args) =>
{
(widget as NewGui.FramedIcon).IconTint = new Vector4(0.99f, 0.9f, 0.8f, 1.0f);
},
OnMouseLeave = (widget, args) =>
{
(widget as NewGui.FramedIcon).IconTint = Vector4.One;
},
OnClick = (widget, args) =>
{
Master.VoxSelector.Brush = VoxelBrush.Shell;
},
Enabled = false
},
new NewGui.FramedIcon
{
Icon = new Gum.TileReference("tool-icons", 31),
DrawFrame = false,
Tooltip = "Stairs brush",
OnMouseEnter = (widget, args) =>
{
(widget as NewGui.FramedIcon).IconTint = new Vector4(0.99f, 0.9f, 0.8f, 1.0f);
},
OnMouseLeave = (widget, args) =>
{
(widget as NewGui.FramedIcon).IconTint = Vector4.One;
},
OnClick = (widget, args) =>
{
Master.VoxSelector.Brush = VoxelBrush.Stairs;
},
Enabled = false
}
},
OnClick = (widget, args) =>
{
var tray = widget as NewGui.IconTray;
var items = tray.Children;
var button0 = items[0] as NewGui.FramedIcon;
var button1 = items[1] as NewGui.FramedIcon;
var button2 = items[2] as NewGui.FramedIcon;
button0.Enabled = Master.VoxSelector.Brush == VoxelBrush.Box;
button1.Enabled = Master.VoxSelector.Brush == VoxelBrush.Shell;
button2.Enabled = Master.VoxSelector.Brush == VoxelBrush.Stairs;
}
}) as NewGui.IconTray;
#endregion
#region Setup bottom right tray
#endregion |
<<<<<<<
=======
/// <summary>
/// Renders the component.
/// </summary>
/// <param name="gameTime">The game time.</param>
/// <param name="chunks">The chunk manager.</param>
/// <param name="camera">The camera.</param>
/// <param name="spriteBatch">The sprite batch.</param>
/// <param name="graphicsDevice">The graphics device.</param>
/// <param name="effect">The shader to use.</param>
/// <param name="renderingForWater">if set to <c>true</c> rendering for water reflections.</param>
public virtual void Render(DwarfTime gameTime, ChunkManager chunks, Camera camera, SpriteBatch spriteBatch, GraphicsDevice graphicsDevice, Effect effect, bool renderingForWater)
{
}
/// <summary>
/// Renders the component to the selection buffer (for selecting stuff on screen).
/// </summary>
/// <param name="gameTime">The game time.</param>
/// <param name="chunks">The chunks.</param>
/// <param name="camera">The camera.</param>
/// <param name="spriteBatch">The sprite batch.</param>
/// <param name="graphicsDevice">The graphics device.</param>
/// <param name="effect">The shader to use.</param>
public virtual void RenderSelectionBuffer(DwarfTime gameTime, ChunkManager chunks, Camera camera,
SpriteBatch spriteBatch, GraphicsDevice graphicsDevice, Effect effect)
{
}
/// <summary>
/// Converts the global identifier into a color for rendering to
/// the selection buffer.
/// </summary>
/// <returns></returns>
public Color GetGlobalIDColor()
{
// 0xFFFFFFFF
// 0xRRGGBBAA
int r = (int)(GlobalID >> 6);
int g = (int)((GlobalID >> 4) & 0x000000FF);
int b = (int)((GlobalID >> 2) & 0x000000FF);
int a = (int)((GlobalID) & 0x000000FF);
//return new Color {PackedValue = GlobalID};
return new Color(r, g, b, a);
}
/// <summary>
/// Converts a packed color representation of a global ID to a global ID.
/// </summary>
/// <param name="color">The color (packed representaiton)</param>
/// <returns></returns>
public static uint GlobalIDFromColor(Color color)
{
// 0xFFFFFFFF
// 0xRRGGBBAA
//return color.PackedValue;
uint id = 0;
id = id | (uint) (color.R << 6);
id = id | (uint) (color.G << 4);
id = id | (uint) (color.B << 2);
id = id | (uint) (color.A);
return id;
}
>>>>>>>
/// <summary>
/// Renders the component to the selection buffer (for selecting stuff on screen).
/// </summary>
/// <param name="gameTime">The game time.</param>
/// <param name="chunks">The chunks.</param>
/// <param name="camera">The camera.</param>
/// <param name="spriteBatch">The sprite batch.</param>
/// <param name="graphicsDevice">The graphics device.</param>
/// <param name="effect">The shader to use.</param>
public virtual void RenderSelectionBuffer(DwarfTime gameTime, ChunkManager chunks, Camera camera,
SpriteBatch spriteBatch, GraphicsDevice graphicsDevice, Effect effect)
{
}
/// <summary>
/// Converts the global identifier into a color for rendering to
/// the selection buffer.
/// </summary>
/// <returns></returns>
public Color GetGlobalIDColor()
{
// 0xFFFFFFFF
// 0xRRGGBBAA
int r = (int)(GlobalID >> 6);
int g = (int)((GlobalID >> 4) & 0x000000FF);
int b = (int)((GlobalID >> 2) & 0x000000FF);
int a = (int)((GlobalID) & 0x000000FF);
//return new Color {PackedValue = GlobalID};
return new Color(r, g, b, a);
}
/// <summary>
/// Converts a packed color representation of a global ID to a global ID.
/// </summary>
/// <param name="color">The color (packed representaiton)</param>
/// <returns></returns>
public static uint GlobalIDFromColor(Color color)
{
// 0xFFFFFFFF
// 0xRRGGBBAA
//return color.PackedValue;
uint id = 0;
id = id | (uint) (color.R << 6);
id = id | (uint) (color.G << 4);
id = id | (uint) (color.B << 2);
id = id | (uint) (color.A);
return id;
} |
<<<<<<<
DigOrders.Add(GetVoxelQuickCompare(order.Vox), order);
World.DesignationDrawer.HiliteVoxel(order.Vox.Coordinate, DesignationType.Dig);
=======
DigOrders.Add(order.Vox, order);
if (this == World.PlayerFaction)
World.DesignationDrawer.HiliteVoxel(order.Vox.Coordinate, DesignationType.Dig);
>>>>>>>
DigOrders.Add(GetVoxelQuickCompare(order.Vox), order);
if (this == World.PlayerFaction)
World.DesignationDrawer.HiliteVoxel(order.Vox.Coordinate, DesignationType.Dig);
<<<<<<<
DigOrders.Remove(qc);
World.DesignationDrawer.UnHiliteVoxel(vox.Coordinate, DesignationType.Dig);
=======
DigOrders.Remove(vox);
if (this == World.PlayerFaction)
World.DesignationDrawer.UnHiliteVoxel(vox.Coordinate, DesignationType.Dig);
>>>>>>>
DigOrders.Remove(qc);
if (this == World.PlayerFaction)
World.DesignationDrawer.UnHiliteVoxel(vox.Coordinate, DesignationType.Dig); |
<<<<<<<
WorldManager.MakeAnnouncement("If we don't make a profit by tomorrow, our stock will crash!");
=======
WorldManager.MakeAnnouncement("We're bankrupt!", "If we don't make a profit by tomorrow, our stock will crash!");
SoundManager.PlaySound(ContentPaths.Audio.Oscar.sfx_gui_negative_generic, 0.5f);
>>>>>>>
WorldManager.MakeAnnouncement("If we don't make a profit by tomorrow, our stock will crash!");
SoundManager.PlaySound(ContentPaths.Audio.Oscar.sfx_gui_negative_generic, 0.5f); |
<<<<<<<
//GamePerformance.Instance.StartTrackPerformance("Diplomacy");
ComponentManager.Diplomacy.Update(gameTime, Time.CurrentDate);
//GamePerformance.Instance.StopTrackPerformance("Diplomacy");
//GamePerformance.Instance.StartTrackPerformance("Components");
=======
ComponentManager.Diplomacy.Update(gameTime, Time.CurrentDate, this);
>>>>>>>
//GamePerformance.Instance.StartTrackPerformance("Diplomacy");
ComponentManager.Diplomacy.Update(gameTime, Time.CurrentDate, this);
//GamePerformance.Instance.StopTrackPerformance("Diplomacy");
//GamePerformance.Instance.StartTrackPerformance("Components");
<<<<<<<
DefaultShader.Parameters["xTimeOfDay"].SetValue(Sky.TimeOfDay);
//GamePerformance.Instance.StartTrackPerformance("Monster Spawner");
=======
DefaultShader.TimeOfDay = Sky.TimeOfDay;
>>>>>>>
DefaultShader.TimeOfDay = Sky.TimeOfDay;
//GamePerformance.Instance.StartTrackPerformance("Monster Spawner");
<<<<<<<
//GamePerformance.Instance.StopTrackPerformance("Sound Manager");
//GamePerformance.Instance.StartTrackPerformance("Weather");
Weather.Update();
//GamePerformance.Instance.StopTrackPerformance("Weather");
=======
Weather.Update(this.Time.CurrentDate, this);
>>>>>>>
//GamePerformance.Instance.StopTrackPerformance("Sound Manager");
//GamePerformance.Instance.StartTrackPerformance("Weather");
Weather.Update(this.Time.CurrentDate, this);
//GamePerformance.Instance.StopTrackPerformance("Weather"); |
<<<<<<<
ExpandChildWhenDisabled = true,
Tooltip = "Build walls",
=======
Tooltip = "Place blocks",
>>>>>>>
ExpandChildWhenDisabled = true,
Tooltip = "Place blocks",
<<<<<<<
Tooltip = "Build " + data.Name,
// Todo: Need icons for wall types.
Icon = new Gum.TileReference("voxels", data.ID),
ExpansionChild = new NewGui.BuildWallInfo
{
Data = data,
Rect = new Rectangle(0,0,256,128),
Master = Master
},
OnClick = (sender, args) =>
{
Master.Faction.RoomBuilder.CurrentRoomData = null;
Master.VoxSelector.SelectionType = VoxelSelectionType.SelectEmpty;
Master.Faction.WallBuilder.CurrentVoxelType = data;
Master.Faction.CraftBuilder.IsEnabled = false;
ChangeTool(GameMaster.ToolMode.Build);
World.ShowToolPopup("Click and drag to build " + data.Name + " wall.");
},
OnConstruct = (sender) =>
{
ToolbarItems.Add(new ToolbarItem(sender, () =>
((sender as NewGui.ToolTray.Icon).ExpansionChild as NewGui.BuildWallInfo).CanBuild()));
}
})
=======
widget.Clear();
((NewGui.ToolTray.Tray) widget).ItemSource = VoxelLibrary.GetTypes()
.Where(voxel => voxel.IsBuildable && World.PlayerFaction.HasResources(voxel.ResourceToRelease))
.Select(data => new NewGui.ToolTray.Icon
{
Tooltip = "Build " + data.Name,
// Todo: Need icons for wall types.
Icon = new Gum.TileReference("voxels", data.ID),
ExpansionChild = new NewGui.BuildWallInfo
{
Data = data,
Rect = new Rectangle(0, 0, 256, 128)
},
OnClick = (sender, args) =>
{
Master.Faction.RoomBuilder.CurrentRoomData = null;
Master.VoxSelector.SelectionType = VoxelSelectionType.SelectEmpty;
Master.Faction.WallBuilder.CurrentVoxelType = data;
Master.Faction.CraftBuilder.IsEnabled = false;
ChangeTool(GameMaster.ToolMode.Build);
World.ShowToolPopup("Click and drag to build " + data.Name + " wall.");
},
Hidden = false
//Todo: Add to toolbar item list & disable if not enough resources?
});
widget.Construct();
widget.Hidden = false;
widget.Invalidate();
widget.Layout();
}
>>>>>>>
widget.Clear();
((NewGui.ToolTray.Tray) widget).ItemSource = VoxelLibrary.GetTypes()
.Where(voxel => voxel.IsBuildable && World.PlayerFaction.HasResources(voxel.ResourceToRelease))
.Select(data => new NewGui.ToolTray.Icon
{
Tooltip = "Build " + data.Name,
Icon = new Gum.TileReference("voxels", data.ID),
ExpansionChild = new NewGui.BuildWallInfo
{
Data = data,
Rect = new Rectangle(0, 0, 256, 128)
},
OnClick = (sender, args) =>
{
Master.Faction.RoomBuilder.CurrentRoomData = null;
Master.VoxSelector.SelectionType = VoxelSelectionType.SelectEmpty;
Master.Faction.WallBuilder.CurrentVoxelType = data;
Master.Faction.CraftBuilder.IsEnabled = false;
ChangeTool(GameMaster.ToolMode.Build);
World.ShowToolPopup("Click and drag to build " + data.Name + " wall.");
},
Hidden = false
});
widget.Construct();
widget.Hidden = false;
widget.Layout();
} |
<<<<<<<
// TODO [issue #710] Road adjust mechanism seem to have changed in Sunset Harbor DLC.
// activate when we know the mechinism.
private bool ReadjustPathMode => false; //ShiftIsPressed;
=======
// /// <summary>Set this to true to once call <see cref="RequestOnscreenDisplayUpdate"/>.</summary>
// public bool InvalidateOnscreenDisplayFlag { get; set; }
>>>>>>>
// TODO [issue #710] Road adjust mechanism seem to have changed in Sunset Harbor DLC.
// activate when we know the mechinism.
private bool ReadjustPathMode => false; //ShiftIsPressed;
// /// <summary>Set this to true to once call <see cref="RequestOnscreenDisplayUpdate"/>.</summary>
// public bool InvalidateOnscreenDisplayFlag { get; set; }
<<<<<<<
public void OnToolGUIImpl(Event e) {
=======
protected override void OnToolGUI(Event e) {
// if (InvalidateOnscreenDisplayFlag) {
// this.InvalidateOnscreenDisplayFlag = false;
// this.RequestOnscreenDisplayUpdate();
// }
>>>>>>>
public void OnToolGUIImpl(Event e) {
// if (InvalidateOnscreenDisplayFlag) {
// this.InvalidateOnscreenDisplayFlag = false;
// this.RequestOnscreenDisplayUpdate();
// } |
<<<<<<<
Manager.World.MakeAnnouncement(String.Format("{0} ({1}) refuses to work!",
Stats.FullName, Stats.CurrentLevel.Name), ZoomToMe);
=======
Manager.World.MakeAnnouncement(String.Format("{0} ({1}) refuses to work!",
Stats.FullName, Stats.CurrentLevel.Name),
"Our employee is unhappy, and would rather not work!", ZoomToMe);
SoundManager.PlaySound(ContentPaths.Audio.Oscar.sfx_gui_negative_generic, 0.5f);
>>>>>>>
Manager.World.MakeAnnouncement(String.Format("{0} ({1}) refuses to work!",
Stats.FullName, Stats.CurrentLevel.Name), ZoomToMe);
SoundManager.PlaySound(ContentPaths.Audio.Oscar.sfx_gui_negative_generic, 0.5f); |
<<<<<<<
ExpandChildWhenDisabled = true,
=======
Tooltip = "Build walls",
>>>>>>>
ExpandChildWhenDisabled = true,
Tooltip = "Build walls",
<<<<<<<
},
OnConstruct = (sender) =>
{
ToolbarItems.Add(new ToolbarItem(sender, () =>
((sender as NewGui.ToolTray.Icon).ExpansionChild as NewGui.BuildWallInfo).CanBuild()));
}
=======
},
//Todo: Add to toolbar item list & disable if not enough resources?
>>>>>>>
},
OnConstruct = (sender) =>
{
ToolbarItems.Add(new ToolbarItem(sender, () =>
((sender as NewGui.ToolTray.Icon).ExpansionChild as NewGui.BuildWallInfo).CanBuild()));
} |
<<<<<<<
{
BuildGrassMotes();
=======
{
>>>>>>>
{
BuildGrassMotes();
<<<<<<<
}
IsRebuilding = false;
=======
}
ShouldRebuild = false;
>>>>>>>
}
IsRebuilding = false;
ShouldRebuild = false; |
<<<<<<<
[JsonObject(IsReference = true)]
public class Cactus : Plant
{
public Cactus() { }
public Cactus(ComponentManager Manager, Vector3 position, string asset, float bushSize) :
base(Manager, "Cactus", Matrix.Identity, new Vector3(bushSize, bushSize, bushSize), asset, bushSize)
{
BoundingBoxPos = Vector3.Zero;
Seedlingsheet = new SpriteSheet(ContentPaths.Entities.Plants.vine, 32, 32);
SeedlingFrame = new Point(0, 0);
Matrix matrix = Matrix.Identity;
matrix.Translation = position + new Vector3(0.5f, -0.15f, 0.5f);
LocalTransform = matrix;
AddChild(new Health(Manager, "HP", 30 * bushSize, 0.0f, 30 * bushSize));
AddChild(new Flammable(Manager, "Flames"));
var voxelUnder = VoxelHelpers.FindFirstVoxelBelow(new VoxelHandle(
Manager.World.ChunkManager.ChunkData,
GlobalVoxelCoordinate.FromVector3(position)));
if (voxelUnder.IsValid)
AddChild(new VoxelListener(Manager, Manager.World.ChunkManager,
voxelUnder));
Inventory inventory = AddChild(new Inventory(Manager, "Inventory", BoundingBox.Extents(), BoundingBoxPos)
{
Resources = new List<Inventory.InventoryItem>(),
}) as Inventory;
inventory.AddResource(new ResourceAmount()
{
NumResources = 2,
ResourceType = ResourceLibrary.ResourceType.Cactus
});
var particles = AddChild(new ParticleTrigger("Leaves", Manager, "LeafEmitter",
Matrix.Identity, BoundingBoxPos, GetBoundingBox().Extents())
{
SoundToPlay = ContentPaths.Audio.Oscar.sfx_env_bush_harvest_1
}) as ParticleTrigger;
Tags.Add("Vegetation");
Tags.Add("Cactus");
AddToCollisionManager = true;
CollisionType = CollisionManager.CollisionType.Static;
PropogateTransforms();
}
}
//Todo: Split file
[JsonObject(IsReference = true)]
=======
>>>>>>>
//Todo: Split file
[JsonObject(IsReference = true)] |
<<<<<<<
using DwarfCorp.Goals;
=======
using Newtonsoft.Json;
>>>>>>>
using Newtonsoft.Json;
using DwarfCorp.Goals;
<<<<<<<
if (LastWorldPopup != null)
{
List<uint> removals = new List<uint>();
foreach (var popup in LastWorldPopup)
{
popup.Value.Update(gameTime, Camera, GraphicsDevice.Viewport);
if (popup.Value.Widget == null || !Gui.RootItem.Children.Contains(popup.Value.Widget)
|| popup.Value.BodyToTrack == null || popup.Value.BodyToTrack.IsDead)
{
removals.Add(popup.Key);
}
}
foreach (var removal in removals)
{
if (LastWorldPopup[removal].Widget != null && Gui.RootItem.Children.Contains(LastWorldPopup[removal].Widget))
{
Gui.DestroyWidget(LastWorldPopup[removal].Widget);
}
LastWorldPopup.Remove(removal);
}
}
=======
>>>>>>>
if (LastWorldPopup != null)
{
List<uint> removals = new List<uint>();
foreach (var popup in LastWorldPopup)
{
popup.Value.Update(gameTime, Camera, GraphicsDevice.Viewport);
if (popup.Value.Widget == null || !Gui.RootItem.Children.Contains(popup.Value.Widget)
|| popup.Value.BodyToTrack == null || popup.Value.BodyToTrack.IsDead)
{
removals.Add(popup.Key);
}
}
foreach (var removal in removals)
{
if (LastWorldPopup[removal].Widget != null && Gui.RootItem.Children.Contains(LastWorldPopup[removal].Widget))
{
Gui.DestroyWidget(LastWorldPopup[removal].Widget);
}
LastWorldPopup.Remove(removal);
}
} |
<<<<<<<
public static Gum.Input.GumInputMapper GumInputMapper;
public static Gum.Input.Input GumInput;
public static Gum.RenderData GumSkin;
=======
public static GumInputMapper GumInput;
public static Input GemInput;
public static RenderData GumSkin;
public static WorldManager World { get; set; }
>>>>>>>
public static Gum.Input.GumInputMapper GumInputMapper;
public static Gum.Input.Input GumInput;
public static Gum.RenderData GumSkin;
public static WorldManager World { get; set; }
<<<<<<<
GumInputMapper = new Gum.Input.GumInputMapper(Window.Handle);
GumInput = new Gum.Input.Input(GumInputMapper);
=======
GumInput = new GumInputMapper(Window.Handle);
GemInput = new Input(GumInput);
>>>>>>>
GumInputMapper = new Gum.Input.GumInputMapper(Window.Handle);
GumInput = new Gum.Input.Input(GumInputMapper);
<<<<<<<
GumInput.AddAction("TEST", Gum.Input.KeyBindingType.Pressed);
=======
GemInput.AddAction("TEST", Input.KeyBindingType.Pressed);
>>>>>>>
GumInput.AddAction("TEST", Gum.Input.KeyBindingType.Pressed); |
<<<<<<<
public AnimalPen(IEnumerable<VoxelHandle> voxels, WorldManager world) :
base(voxels, AnimalPenData, world)
=======
public AnimalPen(IEnumerable<Voxel> voxels, WorldManager world, Faction faction) :
base(voxels, AnimalPenData, world, faction)
>>>>>>>
public AnimalPen(IEnumerable<VoxelHandle> voxels, WorldManager world, Faction faction) :
base(voxels, AnimalPenData, world, faction) |
<<<<<<<
result = commandExecutor.execute("cmd.exe", "/c bob123123", ApplicationParameters.DefaultWaitForExitInSeconds, fileSystem.get_current_directory(), null, (s, e) => { errorOutput += e.Data; }, updateProcessPath: false);
=======
result = CommandExecutor.execute("cmd.exe", "/c bob123123", ApplicationParameters.DefaultWaitForExitInSeconds, fileSystem.get_current_directory(), null, (s, e) => { errorOutput += e.Data; }, updateProcessPath: false, allowUseWindow: false);
>>>>>>>
result = commandExecutor.execute("cmd.exe", "/c bob123123", ApplicationParameters.DefaultWaitForExitInSeconds, fileSystem.get_current_directory(), null, (s, e) => { errorOutput += e.Data; }, updateProcessPath: false, allowUseWindow: false); |
<<<<<<<
config.Features.CheckSumFiles = set_feature_flag(ApplicationParameters.Features.CheckSumFiles, configFileSettings, defaultEnabled: true);
config.Features.AutoUninstaller = set_feature_flag(ApplicationParameters.Features.AutoUninstaller, configFileSettings, defaultEnabled: true);
config.PromptForConfirmation = !set_feature_flag(ApplicationParameters.Features.AllowGlobalConfirmation, configFileSettings, defaultEnabled: false);
=======
config.Features.CheckSumFiles = set_feature_flag(ApplicationParameters.Features.CheckSumFiles, configFileSettings);
config.Features.AutoUninstaller = set_feature_flag(ApplicationParameters.Features.AutoUninstaller, configFileSettings);
config.Features.FailOnAutoUninstaller = set_feature_flag(ApplicationParameters.Features.FailOnAutoUninstaller, configFileSettings);
config.PromptForConfirmation = !set_feature_flag(ApplicationParameters.Features.AllowGlobalConfirmation, configFileSettings);
>>>>>>>
config.Features.CheckSumFiles = set_feature_flag(ApplicationParameters.Features.CheckSumFiles, configFileSettings, defaultEnabled: true);
config.Features.AutoUninstaller = set_feature_flag(ApplicationParameters.Features.AutoUninstaller, configFileSettings, defaultEnabled: true);
config.Features.FailOnAutoUninstaller = set_feature_flag(ApplicationParameters.Features.FailOnAutoUninstaller, configFileSettings, defaultEnabled: false);
config.PromptForConfirmation = !set_feature_flag(ApplicationParameters.Features.AllowGlobalConfirmation, configFileSettings, defaultEnabled: false); |
<<<<<<<
using Moq;
=======
using NUnit.Framework;
>>>>>>>
using NUnit.Framework;
using Moq; |
<<<<<<<
bool nextHasPrioritySigns = Constants.ManagerFactory.TrafficPriorityManager.HasNodePrioritySign(nextNodeId);
bool nextIsRealJunction = false;
=======
ushort buildingId = 0;
>>>>>>>
bool nextHasPrioritySigns = Constants.ManagerFactory.TrafficPriorityManager.HasNodePrioritySign(nextNodeId);
bool nextIsRealJunction = false;
ushort buildingId = 0;
<<<<<<<
nextIsRealJunction = node.CountSegments() >= 3;
=======
buildingId = NetNode.FindOwnerBuilding(nextNodeId, 32f);
>>>>>>>
nextIsRealJunction = node.CountSegments() >= 3;
buildingId = NetNode.FindOwnerBuilding(nextNodeId, 32f);
<<<<<<<
Log._Debug($"RoutingManager.RecalculateLaneEndRoutingData({segmentId}, {laneIndex}, {laneId}, {startNode}): nextIsJunction={nextIsJunction} nextIsEndOrOneWayOut={nextIsEndOrOneWayOut} nextHasTrafficLights={nextHasTrafficLights} nextIsSimpleJunction={nextIsSimpleJunction} nextIsSplitJunction={nextIsSplitJunction} isNextRealJunction={nextIsRealJunction}");
=======
Log._Debug($"RoutingManager.RecalculateLaneEndRoutingData({segmentId}, {laneIndex}, {laneId}, {startNode}): nextIsJunction={nextIsJunction} nextIsEndOrOneWayOut={nextIsEndOrOneWayOut} nextHasTrafficLights={nextHasTrafficLights} nextIsSimpleJunction={nextIsSimpleJunction} nextIsSplitJunction={nextIsSplitJunction} isNextRealJunction={isNextRealJunction}");
Log._Debug($"RoutingManager.RecalculateLaneEndRoutingData({segmentId}, {laneIndex}, {laneId}, {startNode}): nextNodeId={nextNodeId} buildingId={buildingId} isTollBooth={isTollBooth}");
>>>>>>>
Log._Debug($"RoutingManager.RecalculateLaneEndRoutingData({segmentId}, {laneIndex}, {laneId}, {startNode}): nextIsJunction={nextIsJunction} nextIsEndOrOneWayOut={nextIsEndOrOneWayOut} nextHasTrafficLights={nextHasTrafficLights} nextIsSimpleJunction={nextIsSimpleJunction} nextIsSplitJunction={nextIsSplitJunction} isNextRealJunction={nextIsRealJunction}");
Log._Debug($"RoutingManager.RecalculateLaneEndRoutingData({segmentId}, {laneIndex}, {laneId}, {startNode}): nextNodeId={nextNodeId} buildingId={buildingId} isTollBooth={isTollBooth}"); |
<<<<<<<
#if !SILVERLIGHT
using System.ServiceModel;
#if !NETCORE
using System.ServiceModel.Web;
=======
>>>>>>>
<<<<<<<
#if !NETCORE
[Fact(Timeout = 2000)]
=======
[Fact]
>>>>>>>
[Fact]
<<<<<<<
#region Silverlight excluded
#if !SILVERLIGHT && !NETCORE
=======
>>>>>>> |
<<<<<<<
=======
public static TAttribute GetCustomAttribute<TAttribute>(this ICustomAttributeProvider source, bool inherit)
where TAttribute : Attribute
{
object[] attrs = source.GetCustomAttributes(typeof (TAttribute), inherit);
if (attrs.Length == 0)
{
return default(TAttribute);
}
else
{
return (TAttribute) attrs[0];
}
}
>>>>>>>
<<<<<<<
=======
#if SILVERLIGHT
/* The test listed below fails when we call the setValue in silverlight...
*
*
* Assembly:
* Moq.Tests.Silverlight.MSTest
* Namespace:
* Moq.Tests
* Test class:
* MockedEventsFixture
* Test method:
* ShouldPreserveStackTraceWhenRaisingEvent
* at System.Reflection.RtFieldInfo.PerformVisibilityCheckOnField(IntPtr field, Object target, IntPtr declaringType, FieldAttributes attr, UInt32 invocationFlags) at System.Reflection.RtFieldInfo.InternalSetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture, Boolean doVisibilityCheck, Boolean doCheckConsistency) at System.Reflection.RtFieldInfo.InternalSetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture, Boolean doVisibilityCheck) at System.Reflection.RtFieldInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture) at System.Reflection.FieldInfo.SetValue(Object obj, Object value) at Moq.Extensions.InvokePreserveStack(Delegate del, Object[] args) at Moq.MockedEvent.DoRaise(EventArgs args) at Moq.MockedEvent`1.Raise(TEventArgs args) at Moq.Tests.MockedEventsFixture.<>c__DisplayClass16.<ShouldPreserveStackTraceWhenRaisingEvent>b__14() at Xunit.Record.Exception(ThrowsDelegate code)
*/
#else
>>>>>>>
<<<<<<<
return t.GetTypeInfo().IsSubclassOf(typeof(Delegate));
=======
return t.IsSubclassOf(typeof (Delegate));
>>>>>>>
return t.GetTypeInfo().IsSubclassOf(typeof(Delegate)); |
<<<<<<<
{
foreach (var bitmap in definition.Textures)
{
var scaled = bitmap;//new Bitmap(bitmap, new System.Drawing.Size(bitmapSize, bitmapSize));
int[] data = new int[scaled.Width * scaled.Height];
var bitmapData = scaled.LockBits(new System.Drawing.Rectangle(0, 0, scaled.Width, scaled.Height), ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
System.Runtime.InteropServices.Marshal.Copy(bitmapData.Scan0, data, 0, data.Length);
blockTextures.SetData(data, layer);
scaled.UnlockBits(bitmapData);
layer++;
}
}
=======
{
foreach (var texture in definition.Textures)
{
bitmaps.Add(manager.Game.Assets.LoadBitmap(definition.GetType(), texture));
}
}
>>>>>>>
{
foreach (var bitmap in definition.Textures)
{
var scaled = bitmap;//new Bitmap(bitmap, new System.Drawing.Size(bitmapSize, bitmapSize));
int[] data = new int[scaled.Width * scaled.Height];
var bitmapData = scaled.LockBits(new System.Drawing.Rectangle(0, 0, scaled.Width, scaled.Height), ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
System.Runtime.InteropServices.Marshal.Copy(bitmapData.Scan0, data, 0, data.Length);
blockTextures.SetData(data, layer);
scaled.UnlockBits(bitmapData);
layer++;
}
}
{
foreach (var texture in definition.Textures)
{
bitmaps.Add(manager.Game.Assets.LoadBitmap(definition.GetType(), texture));
}
} |
<<<<<<<
extCitInstMan.Reset(ref extInstance);
return ExtSoftPathState.FailedHard;
=======
extInstance.Reset();
return ExtSoftPathState.FailedHard;
}
>>>>>>>
extCitInstMan.Reset(ref extInstance);
return ExtSoftPathState.FailedHard;
}
<<<<<<<
/// <summary>
/// Updates the vehicle's main path state by checking against the return path state
/// </summary>
/// <param name="vehicleId">vehicle id</param>
/// <param name="vehicleData">vehicle data</param>
/// <param name="mainPathState">current state of the vehicle's main path</param>
/// <returns></returns>
public ExtPathState UpdateCarPathState(ushort vehicleId, ref Vehicle vehicleData, ref ExtCitizenInstance driverExtInstance, ExtPathState mainPathState) {
IExtCitizenInstanceManager extCitInstMan = Constants.ManagerFactory.ExtCitizenInstanceManager;
=======
public ExtSoftPathState UpdateCarPathState(ushort vehicleId, ref Vehicle vehicleData, ref CitizenInstance driverInstance, ref ExtCitizenInstance driverExtInstance, ExtPathState mainPathState) {
>>>>>>>
public ExtSoftPathState UpdateCarPathState(ushort vehicleId, ref Vehicle vehicleData, ref CitizenInstance driverInstance, ref ExtCitizenInstance driverExtInstance, ExtPathState mainPathState) {
<<<<<<<
if (ExtVehicleManager.Instance.ExtVehicles[vehicleId].vehicleType != ExtVehicleType.PassengerCar) {
=======
if (!driverExtInstance.IsValid()) {
// no driver
#if DEBUG
if (debug)
Log._Debug($"AdvancedParkingManager.UpdateCarPathState({vehicleId}, ..., {mainPathState}): no driver found!");
#endif
return ExtCitizenInstance.ConvertPathStateToSoftPathState(mainPathState);
}
if (VehicleStateManager.Instance.VehicleStates[vehicleId].vehicleType != ExtVehicleType.PassengerCar) {
>>>>>>>
//ExtCitizenInstance driverExtInstance = ExtCitizenInstanceManager.Instance.GetExtInstance(CustomPassengerCarAI.GetDriverInstance(vehicleId, ref vehicleData));
if (!driverExtInstance.IsValid()) {
// no driver
#if DEBUG
if (debug)
Log._Debug($"AdvancedParkingManager.UpdateCarPathState({vehicleId}, ..., {mainPathState}): no driver found!");
#endif
return ExtCitizenInstance.ConvertPathStateToSoftPathState(mainPathState);
}
if (VehicleStateManager.Instance.VehicleStates[vehicleId].vehicleType != ExtVehicleType.PassengerCar) {
<<<<<<<
extCitInstMan.Reset(ref driverExtInstance);
return mainPathState;
=======
driverExtInstance.Reset();
return ExtCitizenInstance.ConvertPathStateToSoftPathState(mainPathState);
>>>>>>>
driverExtInstance.Reset();
return ExtCitizenInstance.ConvertPathStateToSoftPathState(mainPathState);
<<<<<<<
extCitInstMan.Reset(ref driverExtInstance);
return ExtPathState.Failed;
=======
if (mainPathState == ExtPathState.Failed) {
#if DEBUG
if (debug)
Log._Debug($"AdvancedParkingManager.UpdateCarPathState({vehicleId}, ..., {mainPathState}): Checking if path-finding may be repeated.");
#endif
driverExtInstance.ReleaseReturnPath();
return OnCarPathFindFailure(vehicleId, ref vehicleData, ref driverInstance, ref driverExtInstance);
} else {
#if DEBUG
if (debug)
Log._Debug($"AdvancedParkingManager.UpdateCarPathState({vehicleId}, ..., {mainPathState}): Resetting instance and returning FAILED.");
#endif
driverExtInstance.Reset();
return ExtSoftPathState.FailedHard;
}
>>>>>>>
if (mainPathState == ExtPathState.Failed) {
#if DEBUG
if (debug)
Log._Debug($"AdvancedParkingManager.UpdateCarPathState({vehicleId}, ..., {mainPathState}): Checking if path-finding may be repeated.");
#endif
driverExtInstance.ReleaseReturnPath();
return OnCarPathFindFailure(vehicleId, ref vehicleData, ref driverInstance, ref driverExtInstance);
} else {
#if DEBUG
if (debug)
Log._Debug($"AdvancedParkingManager.UpdateCarPathState({vehicleId}, ..., {mainPathState}): Resetting instance and returning FAILED.");
#endif
extCitInstMan.Reset(ref driverExtInstance);
return ExtSoftPathState.FailedHard;
}
<<<<<<<
extCitInstMan.Reset(ref driverExtInstance);
return ExtPathState.Failed;
=======
driverExtInstance.Reset();
return ExtSoftPathState.FailedHard;
>>>>>>>
extCitInstMan.Reset(ref driverExtInstance);
return ExtSoftPathState.FailedHard; |
<<<<<<<
using engenious;
using OctoAwesome.Common;
using OctoAwesome.EntityComponents;
=======
>>>>>>>
<<<<<<<
/// Die Guid des aktuell geladenen Universums.
/// </summary>
public Guid UniverseId { get; private set; }
/// <summary>
/// Dienste des Spiels.
/// </summary>
public IGameService Service { get; }
/// <summary>
=======
>>>>>>>
/// Die Guid des aktuell geladenen Universums.
/// </summary>
public Guid UniverseId { get; private set; }
/// <summary>
/// Dienste des Spiels.
/// </summary>
public IGameService Service { get; }
/// <summary>
<<<<<<<
UniverseId = Guid.Empty;
Service = service;
=======
>>>>>>>
UniverseId = Guid.Empty;
Service = service; |
<<<<<<<
public AssetComponent Assets { get; private set; }
=======
public Settings Settings { get; private set; }
>>>>>>>
public AssetComponent Assets { get; private set; }
public Settings Settings { get; private set; }
<<<<<<<
Assets = new AssetComponent(this);
Components.Add(Assets);
=======
>>>>>>>
Assets = new AssetComponent(this);
Components.Add(Assets); |
<<<<<<<
/// <summary>
/// Gibt an, ob der Spieler an Boden ist
/// </summary>
=======
[XmlIgnore]
>>>>>>>
/// <summary>
/// Gibt an, ob der Spieler an Boden ist
/// </summary>
[XmlIgnore] |
<<<<<<<
using static TrafficManager.UI.SubTools.PrioritySignsTool;
using static TrafficManager.Util.Shortcuts;
using static TrafficManager.Util.SegmentTraverser;
=======
using TrafficManager.UI.SubTools.LaneArrows;
>>>>>>>
using TrafficManager.UI.SubTools.LaneArrows;
using static TrafficManager.UI.SubTools.PrioritySignsTool;
using static TrafficManager.Util.Shortcuts;
using static TrafficManager.Util.SegmentTraverser;
<<<<<<<
public void CallOnEnable() => OnEnable();
=======
private static bool IsTimedTrafficLightsSubtool(ToolMode a) {
return a == ToolMode.TimedLightsSelectNode
|| a == ToolMode.TimedLightsShowLights
|| a == ToolMode.TimedLightsAddNode
|| a == ToolMode.TimedLightsRemoveNode
|| a == ToolMode.TimedLightsCopyLights;
}
// Overridden to disable base class behavior
>>>>>>>
private static bool IsTimedTrafficLightsSubtool(ToolMode a) {
return a == ToolMode.TimedLightsSelectNode
|| a == ToolMode.TimedLightsShowLights
|| a == ToolMode.TimedLightsAddNode
|| a == ToolMode.TimedLightsRemoveNode
|| a == ToolMode.TimedLightsCopyLights;
}
public void CallOnEnable() => OnEnable();
// Overridden to disable base class behavior
<<<<<<<
public void CallOnToolGUI(Event e) => OnToolGUI(e);
=======
/// <summary>
/// Immediate mode GUI (IMGUI) handler called every frame for input and IMGUI rendering.
/// </summary>
/// <param name="e">Event to handle.</param>
>>>>>>>
public void CallOnToolGUI(Event e) => OnToolGUI(e);
/// <summary>
/// Immediate mode GUI (IMGUI) handler called every frame for input and IMGUI rendering.
/// </summary>
/// <param name="e">Event to handle.</param>
<<<<<<<
void DefaultOnToolGUI(Event e) {
if (e.type == EventType.MouseDown && e.button == 0) {
bool isRoad = HoveredSegmentId != 0 && HoveredSegmentId.ToSegment().Info.m_netAI is RoadBaseAI;
if (!isRoad)
return;
if (ReadjustPathMode) {
bool isRoundabout = RoundaboutMassEdit.Instance.TraverseLoop(HoveredSegmentId, out var segmentList);
if (!isRoundabout) {
segmentList = SegmentTraverser.Traverse(
HoveredSegmentId,
TraverseDirection.AnyDirection,
TraverseSide.Straight,
SegmentStopCriterion.None,
(_) => true);
}
RoadSelectionUtil.SetRoad(HoveredSegmentId, segmentList);
}
InstanceID instanceID = new InstanceID {
NetSegment = HoveredSegmentId,
};
OpenWorldInfoPanel(
instanceID,
HitPos);
} else if (e.type == EventType.MouseDown && e.button == 1) {
Singleton<RoadWorldInfoPanel>.instance.Hide();
}
}
=======
>>>>>>>
void DefaultOnToolGUI(Event e) {
if (e.type == EventType.MouseDown && e.button == 0) {
bool isRoad = HoveredSegmentId != 0 && HoveredSegmentId.ToSegment().Info.m_netAI is RoadBaseAI;
if (!isRoad)
return;
if (ReadjustPathMode) {
bool isRoundabout = RoundaboutMassEdit.Instance.TraverseLoop(HoveredSegmentId, out var segmentList);
if (!isRoundabout) {
segmentList = SegmentTraverser.Traverse(
HoveredSegmentId,
TraverseDirection.AnyDirection,
TraverseSide.Straight,
SegmentStopCriterion.None,
(_) => true);
}
RoadSelectionUtil.SetRoad(HoveredSegmentId, segmentList);
}
InstanceID instanceID = new InstanceID {
NetSegment = HoveredSegmentId,
};
OpenWorldInfoPanel(
instanceID,
HitPos);
} else if (e.type == EventType.MouseDown && e.button == 1) {
Singleton<RoadWorldInfoPanel>.instance.Hide();
}
} |
<<<<<<<
using MonoGameUi;
=======
using Microsoft.Xna.Framework.Input;
using MonoGameUi;
using OctoAwesome.Client.Components;
>>>>>>>
using MonoGameUi;
using OctoAwesome.Client.Components; |
<<<<<<<
=======
bool lht = LaneArrowManager.Instance.Services.SimulationService.TrafficDrivesOnLeft;
>>>>>>> |
<<<<<<<
using System;
=======
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using System;
using System.Diagnostics;
>>>>>>>
using System;
using System.Diagnostics; |
<<<<<<<
/// <summary>
/// Returns a list of all the connections defined for the application.
/// </summary>
/// <returns>An IEnumerable of connections.</returns>
public IEnumerable<Connection> GetConnections()
=======
public Page<Connection> GetConnections(int pageSize = 0)
>>>>>>>
/// <summary>
/// Returns a list of all the connections defined for the application.
/// </summary>
/// <returns>An IEnumerable of connections.</returns>
public Page<Connection> GetConnections(int pageSize = 0)
<<<<<<<
/// <summary>
/// Returns a list of all the social connections defined for the application.
/// </summary>
/// <returns>An IEnumerable of connections.</returns>
public IEnumerable<Connection> GetSocialConnections()
=======
public Page<Connection> GetSocialConnections(int pageSize = 0)
>>>>>>>
/// <summary>
/// Returns a list of all the social connections defined for the application.
/// </summary>
/// <returns>An IEnumerable of connections.</returns>
public Page<Connection> GetSocialConnections(int pageSize = 0)
<<<<<<<
/// <summary>
/// Returns a list of all the enterprise connections defined for the application.
/// </summary>
/// <returns>An IEnumerable of connections.</returns>
public IEnumerable<Connection> GetEnterpriseConnections()
=======
public Page<Connection> GetEnterpriseConnections(int pageSize = 0)
>>>>>>>
/// <summary>
/// Returns a list of all the enterprise connections defined for the application.
/// </summary>
/// <returns>An IEnumerable of connections.</returns>
public Page<Connection> GetEnterpriseConnections(int pageSize = 0)
<<<<<<<
/// <summary>
/// Gets all the users available in a connection.
/// </summary>
/// <param name="connectionName">The connection name.</param>
/// <returns>An IEnumerable of User instances.</returns>
public IEnumerable<User> GetUsersByConnection(string connectionName)
=======
public Page<User> GetUsersByConnection(string connectionName, int pageSize = 0)
>>>>>>>
/// <summary>
/// Gets all the users available in a connection.
/// </summary>
/// <param name="connectionName">The connection name.</param>
/// <returns>An IEnumerable of User instances.</returns>
public Page<User> GetUsersByConnection(string connectionName, int pageSize = 0)
<<<<<<<
/// <summary>
/// Gets all the users available in a connection that match a search string.
/// If the connection doesn't have a directory or it is a social connection like
/// Google OAuth 2 it will return all the users that have logged in to your
/// application at least once.
/// </summary>
/// <param name="connectionName">The connection name.</param>
/// <param name="search">The search string to use.</param>
/// <returns>An IEnumerable of User instances.</returns>
public IEnumerable<User> GetUsersByConnection(string connectionName, string search)
=======
public Page<User> GetUsersByConnection(string connectionName, string search, int pageSize = 0)
>>>>>>>
/// <summary>
/// Gets all the users available in a connection that match a search string.
/// If the connection doesn't have a directory or it is a social connection like
/// Google OAuth 2 it will return all the users that have logged in to your
/// application at least once.
/// </summary>
/// <param name="connectionName">The connection name.</param>
/// <param name="search">The search string to use.</param>
/// <returns>An IEnumerable of User instances.</returns>
public Page<User> GetUsersByConnection(string connectionName, string search, int pageSize = 0)
<<<<<<<
/// <summary>
/// Gets all the users available in social connections.
/// If the connection doesn't have a directory or it is a social connection like
/// Google OAuth 2 it will return all the users that have logged in to your
/// application at least once.
/// </summary>
/// <returns>An IEnumerable of User instances.</returns>
public IEnumerable<User> GetSocialUsers()
=======
public Page<User> GetSocialUsers(int pageSize = 0)
>>>>>>>
/// <summary>
/// Gets all the users available in social connections.
/// If the connection doesn't have a directory or it is a social connection like
/// Google OAuth 2 it will return all the users that have logged in to your
/// application at least once.
/// </summary>
/// <returns>An IEnumerable of User instances.</returns>
public Page<User> GetSocialUsers(int pageSize = 0)
<<<<<<<
/// <summary>
/// Gets all the users available in social connections that match a search string.
/// If the connection doesn't have a directory or it is a social connection like
/// Google OAuth 2 it will return all the users that have logged in to your
/// application at least once.
/// </summary>
/// <param name="search">The search string to use.</param>
/// <returns>An IEnumerable of User instances.</returns>
public IEnumerable<User> GetSocialUsers(string search)
=======
public Page<User> GetSocialUsers(string search, int pageSize = 0)
>>>>>>>
/// <summary>
/// Gets all the users available in social connections that match a search string.
/// If the connection doesn't have a directory or it is a social connection like
/// Google OAuth 2 it will return all the users that have logged in to your
/// application at least once.
/// </summary>
/// <param name="search">The search string to use.</param>
/// <returns>An IEnumerable of User instances.</returns>
public Page<User> GetSocialUsers(string search, int pageSize = 0)
<<<<<<<
/// <summary>
/// Gets all the users available in enterprise connections.
/// If the connection doesn't have a directory or it is a social connection like
/// Google OAuth 2 it will return all the users that have logged in to your
/// application at least once.
/// </summary>
/// <returns>An IEnumerable of User instances.</returns>
public IEnumerable<User> GetEnterpriseUsers()
=======
public Page<User> GetEnterpriseUsers(int pageSize = 0)
>>>>>>>
/// <summary>
/// Gets all the users available in enterprise connections.
/// If the connection doesn't have a directory or it is a social connection like
/// Google OAuth 2 it will return all the users that have logged in to your
/// application at least once.
/// </summary>
/// <returns>An IEnumerable of User instances.</returns>
public Page<User> GetEnterpriseUsers(int pageSize = 0)
<<<<<<<
/// <summary>
/// Gets all the users available in enterprise connections that match a search string.
/// If the connection doesn't have a directory or it is a social connection like
/// Google OAuth 2 it will return all the users that have logged in to your
/// application at least once.
/// </summary>
/// <param name="search">The search string to use.</param>
/// <returns>An IEnumerable of User instances.</returns>
public IEnumerable<User> GetEnterpriseUsers(string search)
=======
public Page<User> GetEnterpriseUsers(string search, int pageSize = 0)
>>>>>>>
/// <summary>
/// Gets all the users available in enterprise connections that match a search string.
/// If the connection doesn't have a directory or it is a social connection like
/// Google OAuth 2 it will return all the users that have logged in to your
/// application at least once.
/// </summary>
/// <param name="search">The search string to use.</param>
/// <returns>An IEnumerable of User instances.</returns>
public Page<User> GetEnterpriseUsers(string search, int pageSize = 0) |
<<<<<<<
#if UNITY_STANDALONE_WIN
[DllImport ("AddLibraryPath")] public static extern void AddLibraryPath();
#endif
[DllImport ("FrameCapturer")] public static extern IntPtr fcExrCreateContext(ref fcExrConfig conf);
[DllImport ("FrameCapturer")] public static extern void fcExrDestroyContext(IntPtr ctx);
[DllImport ("FrameCapturer")] public static extern bool fcExrBeginFrame(IntPtr ctx, string path, int width, int height);
[DllImport ("FrameCapturer")] public static extern bool fcExrAddLayer(IntPtr ctx, IntPtr tex, RenderTextureFormat f, int ch, string name);
[DllImport ("FrameCapturer")] public static extern bool fcExrEndFrame(IntPtr ctx);
=======
>>>>>>> |
<<<<<<<
using (var renderer = ResultRenderer.CreatePdfRenderer(resultPath, DataPath, false)) {
var examplePixPath = this.TestFilePath("processing/multi-page.tif");
=======
using (var renderer = ResultRenderer.CreatePdfRenderer(resultPath, DataPath)) {
var examplePixPath = TestFilePath("processing/multi-page.tif");
>>>>>>>
using (var renderer = ResultRenderer.CreatePdfRenderer(resultPath, DataPath, false)) {
var examplePixPath = TestFilePath("processing/multi-page.tif");
<<<<<<<
Assert.That(File.Exists(expectedOutputFilename), $"Expected a PDF file \"{expectedOutputFilename}\" to have been created; but none was found.");
}
[Test]
public void CanRenderMultiplePageDocumentToPdfFile1()
{
var resultPath = TestResultRunFile(@"ResultRenderers\PDF\multi-page");
using (var renderer = ResultRenderer.CreatePdfRenderer(resultPath, DataPath, false))
{
var examplePixPath = this.TestFilePath("processing/multi-page.tif");
ProcessImageFile(renderer, examplePixPath);
}
var expectedOutputFilename = Path.ChangeExtension(resultPath, "pdf");
Assert.That(File.Exists(expectedOutputFilename), $"Expected a PDF file \"{expectedOutputFilename}\" to have been created; but none was found.");
=======
Assert.That(File.Exists(expectedOutputFilename), $"Expected a PDF file \"{expectedOutputFilename}\" to have been created; but none was found.");
}
[Test]
public void CanRenderMultiplePageDocumentToPdfFile1()
{
var resultPath = TestResultRunFile(@"ResultRenderers\PDF\multi-page");
using (var renderer = ResultRenderer.CreatePdfRenderer(resultPath, DataPath))
{
var examplePixPath = TestFilePath("processing/multi-page.tif");
ProcessImageFile(renderer, examplePixPath);
}
var expectedOutputFilename = Path.ChangeExtension(resultPath, "pdf");
Assert.That(File.Exists(expectedOutputFilename), $"Expected a PDF file \"{expectedOutputFilename}\" to have been created; but none was found.");
>>>>>>>
using (var renderer = ResultRenderer.CreatePdfRenderer(resultPath, DataPath, false))
{
var examplePixPath = TestFilePath("processing/multi-page.tif");
ProcessImageFile(renderer, examplePixPath);
}
Assert.That(File.Exists(expectedOutputFilename), $"Expected a PDF file \"{expectedOutputFilename}\" to have been created; but none was found.");
<<<<<<<
Assert.That(File.Exists(expectedOutputFilename), $"Expected a Box file \"{expectedOutputFilename}\" to have been created; but none was found.");
=======
Assert.That(File.Exists(expectedOutputFilename), $"Expected a Box file \"{expectedOutputFilename}\" to have been created; but none was found.");
}
[Test]
public void CanRenderResultsIntoMultipleOutputFormats()
{
var resultPath = TestResultRunFile(@"ResultRenderers\PDF\phototest");
List<RenderedFormat> formats = new List<RenderedFormat> { RenderedFormat.HOCR, RenderedFormat.PDF, RenderedFormat.TEXT };
using (var renderer = ResultRenderer.CreateRenderers(resultPath, DataPath, formats))
{
var examplePixPath = TestFilePath("Ocr/phototest.tif");
ProcessFile(renderer, examplePixPath);
}
var expectedOutputFilename = Path.ChangeExtension(resultPath, "pdf");
Assert.That(File.Exists(expectedOutputFilename), $"Expected a PDF file \"{expectedOutputFilename}\" to have been created; but none was found.");
expectedOutputFilename = Path.ChangeExtension(resultPath, "hocr");
Assert.That(File.Exists(expectedOutputFilename), $"Expected a HOCR file \"{expectedOutputFilename}\" to have been created; but none was found.");
expectedOutputFilename = Path.ChangeExtension(resultPath, "txt");
Assert.That(File.Exists(expectedOutputFilename), $"Expected a TEXT file \"{expectedOutputFilename}\" to have been created; but none was found.");
>>>>>>>
Assert.That(File.Exists(expectedOutputFilename), $"Expected a Box file \"{expectedOutputFilename}\" to have been created; but none was found.");
}
[Test]
public void CanRenderResultsIntoMultipleOutputFormats()
{
var resultPath = TestResultRunFile(@"ResultRenderers\PDF\phototest");
List<RenderedFormat> formats = new List<RenderedFormat> { RenderedFormat.HOCR, RenderedFormat.PDF, RenderedFormat.TEXT };
using (var renderer = ResultRenderer.CreateRenderers(resultPath, DataPath, formats))
{
var examplePixPath = TestFilePath("Ocr/phototest.tif");
ProcessFile(renderer, examplePixPath);
}
var expectedOutputFilename = Path.ChangeExtension(resultPath, "pdf");
Assert.That(File.Exists(expectedOutputFilename), $"Expected a PDF file \"{expectedOutputFilename}\" to have been created; but none was found.");
expectedOutputFilename = Path.ChangeExtension(resultPath, "hocr");
Assert.That(File.Exists(expectedOutputFilename), $"Expected a HOCR file \"{expectedOutputFilename}\" to have been created; but none was found.");
expectedOutputFilename = Path.ChangeExtension(resultPath, "txt");
Assert.That(File.Exists(expectedOutputFilename), $"Expected a TEXT file \"{expectedOutputFilename}\" to have been created; but none was found.");
<<<<<<<
using (var renderer = new AggregateResultRenderer(ResultRenderer.CreatePdfRenderer(resultPath, DataPath, false), ResultRenderer.CreateTextRenderer(resultPath))) {
var examplePixPath = this.TestFilePath("processing/multi-page.tif");
=======
using (var renderer = new AggregateResultRenderer(ResultRenderer.CreatePdfRenderer(resultPath, DataPath), ResultRenderer.CreateTextRenderer(resultPath))) {
var examplePixPath = TestFilePath("processing/multi-page.tif");
>>>>>>>
using (var renderer = new AggregateResultRenderer(ResultRenderer.CreatePdfRenderer(resultPath, DataPath, false), ResultRenderer.CreateTextRenderer(resultPath))) {
var examplePixPath = TestFilePath("processing/multi-page.tif"); |
<<<<<<<
namespace TrafficManager.U.Button {
using System.Collections.Generic;
=======
namespace TrafficManager.U.Button {
>>>>>>>
namespace TrafficManager.U.Button {
<<<<<<<
using CSUtil.Commons;
using TrafficManager.API.Traffic.Enums;
=======
>>>>>>> |
<<<<<<<
using CorePush.Interfaces;
using CorePush.Utils;
=======
using System;
>>>>>>>
using CorePush.Interfaces;
using CorePush.Utils; |
<<<<<<<
methodImports.Add(string.Format(importFormat, x.Namespace.Name.AddPrefix(), GetPrefixForRequests(), x.TypeCollectionRequestBuilder()));
methodImports.Add(string.Format(importFormat, x.Namespace.Name.AddPrefix(), GetPrefixForRequests(), x.TypeRequestBuilder()));
=======
methodImports.Add(string.Format(importFormat, projectionTypeNS.Name.AddPrefix(), GetPrefixForRequests(), x.ITypeCollectionRequestBuilder()));
methodImports.Add(string.Format(importFormat, projectionTypeNS.Name.AddPrefix(), GetPrefixForRequests(), x.ITypeRequestBuilder()));
>>>>>>>
methodImports.Add(string.Format(importFormat, projectionTypeNS.Name.AddPrefix(), GetPrefixForRequests(), x.TypeCollectionRequestBuilder()));
methodImports.Add(string.Format(importFormat, projectionTypeNS.Name.AddPrefix(), GetPrefixForRequests(), x.TypeRequestBuilder())); |
<<<<<<<
if (!includeStopped && vehicle.GetLastFrameVelocity().sqrMagnitude < TrafficPriorityManager.MAX_SQR_STOP_VELOCITY) {
=======
if (!includeStopped && state.SqrVelocity < GlobalConfig.Instance.PriorityRules.MaxStopVelocity * GlobalConfig.Instance.PriorityRules.MaxStopVelocity) {
>>>>>>>
if (!includeStopped && vehicle.GetLastFrameVelocity().sqrMagnitude < GlobalConfig.Instance.PriorityRules.MaxStopVelocity * GlobalConfig.Instance.PriorityRules.MaxStopVelocity) { |
<<<<<<<
GUIContent wp8SimulatorModeLabel = new GUIContent("Run in Simulator (x86 build)");
GUIContent wp8TestModeLabel = new GUIContent("Simulate Store. (Don't forget to adapt IAPMock.xml to fit your IAPs)");
=======
>>>>>>>
GUIContent wp8SimulatorModeLabel = new GUIContent("Run in Simulator (x86 build)");
GUIContent wp8TestModeLabel = new GUIContent("Simulate Store. (Don't forget to adapt IAPMock.xml to fit your IAPs)");
<<<<<<<
SoomlaEditorScript.SelectableLabelField(frameworkVersion, "1.7.12");
=======
SoomlaEditorScript.SelectableLabelField(frameworkVersion, "1.7.14");
>>>>>>>
SoomlaEditorScript.SelectableLabelField(frameworkVersion, "1.7.14");
<<<<<<<
private static string bpRootPath = Application.dataPath + "/Soomla/compilations/android/android-billing-services/";
private static string wp8RootPath = Application.dataPath + "/Soomla/compilations/wp8/";
=======
private static string bpRootPath = Application.dataPath + "/Soomla/compilations/android/android-billing-services/";
>>>>>>>
private static string bpRootPath = Application.dataPath + "/Soomla/compilations/android/android-billing-services/";
private static string wp8RootPath = Application.dataPath + "/Soomla/compilations/wp8/";
<<<<<<<
public static bool WP8SimulatorBuild
{
get
{
string value;
return SoomlaEditorScript.Instance.SoomlaSettings.TryGetValue("WP8SimulatorBuild", out value) ? Convert.ToBoolean(value) : false;
}
set
{
string v;
SoomlaEditorScript.Instance.SoomlaSettings.TryGetValue("WP8SimulatorBuild", out v);
if (Convert.ToBoolean(v) != value)
{
SoomlaEditorScript.Instance.setSettingsValue("WP8SimulatorBuild", value.ToString());
SoomlaEditorScript.DirtyEditor();
#if UNITY_EDITOR
if (value == true)
{
//FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/Newtonsoft.Json.dll");
//FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/soomla-wp-core.dll");
FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/sqlite3.dll");
FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/Sqlite.dll");
FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/Sqlite.winmd");
//FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/sqlite3.dll");
//FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/wp-store.dll");
/*
FileUtil.CopyFileOrDirectory(wp8RootPath + "x86/Newtonsoft.Json.soomladll",
Application.dataPath + "/Plugins/WP8/Newtonsoft.Json.dll");
FileUtil.CopyFileOrDirectory(wp8RootPath + "x86/soomla-wp-core.soomladll",
Application.dataPath + "/Plugins/WP8/soomla-wp-core.dll");
FileUtil.CopyFileOrDirectory(wp8RootPath + "x86/sqlite3.soomladll",
Application.dataPath + "/Plugins/WP8/sqlite3.dll");
FileUtil.CopyFileOrDirectory(wp8RootPath + "x86/wp-store.soomladll",
Application.dataPath + "/Plugins/WP8/wp-store.dll");
*/
FileUtil.CopyFileOrDirectory(wp8RootPath + "x86/sqlite3.soomladll",
Application.dataPath + "/Plugins/WP8/sqlite3.dll");
FileUtil.CopyFileOrDirectory(wp8RootPath + "x86/Sqlite.soomladll",
Application.dataPath + "/Plugins/WP8/Sqlite.dll");
FileUtil.CopyFileOrDirectory(wp8RootPath + "x86/Sqlite.soomlawinmd",
Application.dataPath + "/Plugins/WP8/Sqlite.winmd");
}
else
{
//FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/Newtonsoft.Json.dll");
//FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/soomla-wp-core.dll");
FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/sqlite3.dll");
FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/Sqlite.dll");
FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/Sqlite.winmd");
//FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/sqlite3.dll");
//FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/wp-store.dll");
/*
FileUtil.CopyFileOrDirectory(wp8RootPath + "ARM/Newtonsoft.Json.soomladll",
Application.dataPath + "/Plugins/WP8/Newtonsoft.Json.dll");
FileUtil.CopyFileOrDirectory(wp8RootPath + "ARM/soomla-wp-core.soomladll",
Application.dataPath + "/Plugins/WP8/soomla-wp-core.dll");
FileUtil.CopyFileOrDirectory(wp8RootPath + "ARM/sqlite3.soomladll",
Application.dataPath + "/Plugins/WP8/sqlite3.dll");
FileUtil.CopyFileOrDirectory(wp8RootPath + "ARM/wp-store.soomladll",
Application.dataPath + "/Plugins/WP8/wp-store.dll");
*/
FileUtil.CopyFileOrDirectory(wp8RootPath + "ARM/sqlite3.soomladll",
Application.dataPath + "/Plugins/WP8/sqlite3.dll");
FileUtil.CopyFileOrDirectory(wp8RootPath + "ARM/Sqlite.soomlawinmd",
Application.dataPath + "/Plugins/WP8/Sqlite.winmd");
FileUtil.CopyFileOrDirectory(wp8RootPath + "ARM/Sqlite.soomladll",
Application.dataPath + "/Plugins/WP8/Sqlite.dll");
}
#endif
}
}
}
public static bool WP8TestMode
{
get
{
string value;
return SoomlaEditorScript.Instance.SoomlaSettings.TryGetValue("WP8TestMode", out value) ? Convert.ToBoolean(value) : false;
}
set
{
string v;
SoomlaEditorScript.Instance.SoomlaSettings.TryGetValue("WP8TestMode", out v);
if (Convert.ToBoolean(v) != value)
{
SoomlaEditorScript.Instance.setSettingsValue("WP8TestMode", value.ToString());
SoomlaEditorScript.DirtyEditor();
}
}
}
=======
>>>>>>>
public static bool WP8SimulatorBuild
{
get
{
string value;
return SoomlaEditorScript.Instance.SoomlaSettings.TryGetValue("WP8SimulatorBuild", out value) ? Convert.ToBoolean(value) : false;
}
set
{
string v;
SoomlaEditorScript.Instance.SoomlaSettings.TryGetValue("WP8SimulatorBuild", out v);
if (Convert.ToBoolean(v) != value)
{
SoomlaEditorScript.Instance.setSettingsValue("WP8SimulatorBuild", value.ToString());
SoomlaEditorScript.DirtyEditor();
#if UNITY_EDITOR
if (value == true)
{
//FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/Newtonsoft.Json.dll");
//FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/soomla-wp-core.dll");
FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/sqlite3.dll");
FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/Sqlite.dll");
FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/Sqlite.winmd");
//FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/sqlite3.dll");
//FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/wp-store.dll");
/*
FileUtil.CopyFileOrDirectory(wp8RootPath + "x86/Newtonsoft.Json.soomladll",
Application.dataPath + "/Plugins/WP8/Newtonsoft.Json.dll");
FileUtil.CopyFileOrDirectory(wp8RootPath + "x86/soomla-wp-core.soomladll",
Application.dataPath + "/Plugins/WP8/soomla-wp-core.dll");
FileUtil.CopyFileOrDirectory(wp8RootPath + "x86/sqlite3.soomladll",
Application.dataPath + "/Plugins/WP8/sqlite3.dll");
FileUtil.CopyFileOrDirectory(wp8RootPath + "x86/wp-store.soomladll",
Application.dataPath + "/Plugins/WP8/wp-store.dll");
*/
FileUtil.CopyFileOrDirectory(wp8RootPath + "x86/sqlite3.soomladll",
Application.dataPath + "/Plugins/WP8/sqlite3.dll");
FileUtil.CopyFileOrDirectory(wp8RootPath + "x86/Sqlite.soomladll",
Application.dataPath + "/Plugins/WP8/Sqlite.dll");
FileUtil.CopyFileOrDirectory(wp8RootPath + "x86/Sqlite.soomlawinmd",
Application.dataPath + "/Plugins/WP8/Sqlite.winmd");
}
else
{
//FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/Newtonsoft.Json.dll");
//FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/soomla-wp-core.dll");
FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/sqlite3.dll");
FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/Sqlite.dll");
FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/Sqlite.winmd");
//FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/sqlite3.dll");
//FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Plugins/WP8/wp-store.dll");
/*
FileUtil.CopyFileOrDirectory(wp8RootPath + "ARM/Newtonsoft.Json.soomladll",
Application.dataPath + "/Plugins/WP8/Newtonsoft.Json.dll");
FileUtil.CopyFileOrDirectory(wp8RootPath + "ARM/soomla-wp-core.soomladll",
Application.dataPath + "/Plugins/WP8/soomla-wp-core.dll");
FileUtil.CopyFileOrDirectory(wp8RootPath + "ARM/sqlite3.soomladll",
Application.dataPath + "/Plugins/WP8/sqlite3.dll");
FileUtil.CopyFileOrDirectory(wp8RootPath + "ARM/wp-store.soomladll",
Application.dataPath + "/Plugins/WP8/wp-store.dll");
*/
FileUtil.CopyFileOrDirectory(wp8RootPath + "ARM/sqlite3.soomladll",
Application.dataPath + "/Plugins/WP8/sqlite3.dll");
FileUtil.CopyFileOrDirectory(wp8RootPath + "ARM/Sqlite.soomlawinmd",
Application.dataPath + "/Plugins/WP8/Sqlite.winmd");
FileUtil.CopyFileOrDirectory(wp8RootPath + "ARM/Sqlite.soomladll",
Application.dataPath + "/Plugins/WP8/Sqlite.dll");
}
#endif
}
}
}
public static bool WP8TestMode
{
get
{
string value;
return SoomlaEditorScript.Instance.SoomlaSettings.TryGetValue("WP8TestMode", out value) ? Convert.ToBoolean(value) : false;
}
set
{
string v;
SoomlaEditorScript.Instance.SoomlaSettings.TryGetValue("WP8TestMode", out v);
if (Convert.ToBoolean(v) != value)
{
SoomlaEditorScript.Instance.setSettingsValue("WP8TestMode", value.ToString());
SoomlaEditorScript.DirtyEditor();
}
}
} |
<<<<<<<
int amount;
if (localItemBalances.TryGetValue(itemId, out amount)) {
return amount;
}
Utils.LogDebug(TAG, "SOOMLA/UNITY Calling GetItemBalance with: " + itemId);
return Instance._getItemBalance(itemId);
=======
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling GetItemBalance with: " + itemId);
return instance._getItemBalance(itemId);
>>>>>>>
int amount;
if (localItemBalances.TryGetValue(itemId, out amount)) {
return amount;
}
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling GetItemBalance with: " + itemId);
return Instance._getItemBalance(itemId);
<<<<<<<
Utils.LogDebug(TAG, "SOOMLA/UNITY Calling GiveItem with itemId: " + itemId + " and amount: " + amount);
Instance._giveItem(itemId, amount);
=======
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling GiveItem with itemId: " + itemId + " and amount: " + amount);
instance._giveItem(itemId, amount);
>>>>>>>
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling GiveItem with itemId: " + itemId + " and amount: " + amount);
Instance._giveItem(itemId, amount);
<<<<<<<
Utils.LogDebug(TAG, "SOOMLA/UNITY Calling TakeItem with itemId: " + itemId + " and amount: " + amount);
Instance._takeItem(itemId, amount);
=======
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling TakeItem with itemId: " + itemId + " and amount: " + amount);
instance._takeItem(itemId, amount);
>>>>>>>
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling TakeItem with itemId: " + itemId + " and amount: " + amount);
Instance._takeItem(itemId, amount);
<<<<<<<
Utils.LogDebug(TAG, "SOOMLA/UNITY Calling EquipVirtualGood with: " + goodItemId);
Instance._equipVirtualGood(goodItemId);
=======
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling EquipVirtualGood with: " + goodItemId);
instance._equipVirtualGood(goodItemId);
>>>>>>>
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling EquipVirtualGood with: " + goodItemId);
Instance._equipVirtualGood(goodItemId);
<<<<<<<
Utils.LogDebug(TAG, "SOOMLA/UNITY Calling UnEquipVirtualGood with: " + goodItemId);
Instance._unEquipVirtualGood(goodItemId);
=======
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling UnEquipVirtualGood with: " + goodItemId);
instance._unEquipVirtualGood(goodItemId);
>>>>>>>
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling UnEquipVirtualGood with: " + goodItemId);
Instance._unEquipVirtualGood(goodItemId);
<<<<<<<
if (localEquippedGoods != null) {
return localEquippedGoods.Contains(goodItemId);
}
Utils.LogDebug(TAG, "SOOMLA/UNITY Calling IsVirtualGoodEquipped with: " + goodItemId);
return Instance._isVertualGoodEquipped(goodItemId);
=======
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling IsVirtualGoodEquipped with: " + goodItemId);
return instance._isVertualGoodEquipped(goodItemId);
>>>>>>>
if (localEquippedGoods != null) {
return localEquippedGoods.Contains(goodItemId);
}
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling IsVirtualGoodEquipped with: " + goodItemId);
return Instance._isVertualGoodEquipped(goodItemId);
<<<<<<<
Upgrade upgrade;
if (localUpgrades != null && localUpgrades.TryGetValue(goodItemId, out upgrade)) {
return upgrade.level;
}
Utils.LogDebug(TAG, "SOOMLA/UNITY Calling GetGoodUpgradeLevel with: " + goodItemId);
return Instance._getGoodUpgradeLevel(goodItemId);
=======
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling GetGoodUpgradeLevel with: " + goodItemId);
return instance._getGoodUpgradeLevel(goodItemId);
>>>>>>>
Upgrade upgrade;
if (localUpgrades != null && localUpgrades.TryGetValue(goodItemId, out upgrade)) {
return upgrade.level;
}
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling GetGoodUpgradeLevel with: " + goodItemId);
return Instance._getGoodUpgradeLevel(goodItemId);
<<<<<<<
Upgrade upgrade;
if (localUpgrades != null && localUpgrades.TryGetValue(goodItemId, out upgrade)) {
return upgrade.itemId;
}
Utils.LogDebug(TAG, "SOOMLA/UNITY Calling GetGoodCurrentUpgrade with: " + goodItemId);
return Instance._getGoodCurrentUpgrade(goodItemId);
=======
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling GetGoodCurrentUpgrade with: " + goodItemId);
return instance._getGoodCurrentUpgrade(goodItemId);
>>>>>>>
Upgrade upgrade;
if (localUpgrades != null && localUpgrades.TryGetValue(goodItemId, out upgrade)) {
return upgrade.itemId;
}
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling GetGoodCurrentUpgrade with: " + goodItemId);
return Instance._getGoodCurrentUpgrade(goodItemId);
<<<<<<<
Utils.LogDebug(TAG, "SOOMLA/UNITY Calling UpgradeGood with: " + goodItemId);
Instance._upgradeGood(goodItemId);
=======
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling UpgradeGood with: " + goodItemId);
instance._upgradeGood(goodItemId);
>>>>>>>
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling UpgradeGood with: " + goodItemId);
Instance._upgradeGood(goodItemId);
<<<<<<<
Utils.LogDebug(TAG, "SOOMLA/UNITY Calling RemoveGoodUpgrades with: " + goodItemId);
Instance._removeGoodUpgrades(goodItemId);
=======
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling RemoveGoodUpgrades with: " + goodItemId);
instance._removeGoodUpgrades(goodItemId);
>>>>>>>
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling RemoveGoodUpgrades with: " + goodItemId);
Instance._removeGoodUpgrades(goodItemId);
<<<<<<<
/** NON-CONSUMABLES **/
/// <summary>
/// Checks if the non-consumable with the given <c>nonConsItemId</c> exists.
/// </summary>
/// <param name="nonConsItemId">Id of the item to check if exists.</param>
/// <returns>True if non-consumable item with nonConsItemId exists, false otherwise.</returns>
/// <exception cref="VirtualItemNotFoundException">Thrown if the item is not found.</exception>
public static bool NonConsumableItemExists(string nonConsItemId) {
int amount;
if (localItemBalances.TryGetValue(nonConsItemId, out amount)) {
return amount > 0;
}
Utils.LogDebug(TAG, "SOOMLA/UNITY Calling NonConsumableItemExists with: " + nonConsItemId);
return Instance._nonConsumableItemExists(nonConsItemId);
}
/// <summary>
/// Adds the non-consumable item with the given <c>nonConsItemId</c> to the non-consumable items storage.
/// </summary>
/// <param name="nonConsItemId">Id of the item to be added.</param>
/// <exception cref="VirtualItemNotFoundException">Thrown if the item is not found.</exception>
public static void AddNonConsumableItem(string nonConsItemId) {
Utils.LogDebug(TAG, "SOOMLA/UNITY Calling AddNonConsumableItem with: " + nonConsItemId);
Instance._addNonConsumableItem(nonConsItemId);
}
/// <summary>
/// Removes the non-consumable item with the given <c>nonConsItemId</c> from the non-consumable
/// items storage.
/// </summary>
/// <param name="nonConsItemId">Id of the item to be removed.</param>
/// <exception cref="VirtualItemNotFoundException">Thrown if the item is not found.</exception>
public static void RemoveNonConsumableItem(string nonConsItemId) {
Utils.LogDebug(TAG, "SOOMLA/UNITY Calling RemoveNonConsumableItem with: " + nonConsItemId);
Instance._removeNonConsumableItem(nonConsItemId);
}
virtual protected bool _nonConsumableItemExists(string nonConsItemId) {
#if UNITY_EDITOR
return GetItemBalance(nonConsItemId) > 0;
#else
return false;
#endif
}
virtual protected void _addNonConsumableItem(string nonConsItemId) {
#if UNITY_EDITOR
if (!NonConsumableItemExists(nonConsItemId)) {
GiveItem(nonConsItemId, 1);
}
#endif
}
virtual protected void _removeNonConsumableItem(string nonConsItemId) {
#if UNITY_EDITOR
TakeItem(nonConsItemId, 1);
#endif
}
#if (!UNITY_IOS && !UNITY_ANDROID) || UNITY_EDITOR
private static void NotifyChange(VirtualItem item, int amount, int change) {
string changeHash = item.ItemId + "#SOOM#" + amount + "#SOOM#" + change;
if (item is VirtualCurrency)
StoreEventsInstance.onCurrencyBalanceChanged(changeHash);
else if (item is VirtualGood)
StoreEventsInstance.onGoodBalanceChanged(changeHash);
}
private static T RequireItem<T>(string itemId, string lookupBy = "ItemId") where T : VirtualItem {
T virtualItem = StoreInfo.GetItemByItemId(itemId) as T;
if (virtualItem == null)
throw new VirtualItemNotFoundException(lookupBy, itemId);
return virtualItem;
}
private static VirtualItem RequireItem(string itemId, string lookupBy = "ItemId") {
return RequireItem<VirtualItem>(itemId, lookupBy);
}
#endif
=======
>>>>>>>
/** NON-CONSUMABLES **/
/// <summary>
/// Checks if the non-consumable with the given <c>nonConsItemId</c> exists.
/// </summary>
/// <param name="nonConsItemId">Id of the item to check if exists.</param>
/// <returns>True if non-consumable item with nonConsItemId exists, false otherwise.</returns>
/// <exception cref="VirtualItemNotFoundException">Thrown if the item is not found.</exception>
public static bool NonConsumableItemExists(string nonConsItemId) {
int amount;
if (localItemBalances.TryGetValue(nonConsItemId, out amount)) {
return amount > 0;
}
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling NonConsumableItemExists with: " + nonConsItemId);
return Instance._nonConsumableItemExists(nonConsItemId);
}
/// <summary>
/// Adds the non-consumable item with the given <c>nonConsItemId</c> to the non-consumable items storage.
/// </summary>
/// <param name="nonConsItemId">Id of the item to be added.</param>
/// <exception cref="VirtualItemNotFoundException">Thrown if the item is not found.</exception>
public static void AddNonConsumableItem(string nonConsItemId) {
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling AddNonConsumableItem with: " + nonConsItemId);
Instance._addNonConsumableItem(nonConsItemId);
}
/// <summary>
/// Removes the non-consumable item with the given <c>nonConsItemId</c> from the non-consumable
/// items storage.
/// </summary>
/// <param name="nonConsItemId">Id of the item to be removed.</param>
/// <exception cref="VirtualItemNotFoundException">Thrown if the item is not found.</exception>
public static void RemoveNonConsumableItem(string nonConsItemId) {
SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY Calling RemoveNonConsumableItem with: " + nonConsItemId);
Instance._removeNonConsumableItem(nonConsItemId);
}
virtual protected bool _nonConsumableItemExists(string nonConsItemId) {
#if UNITY_EDITOR
return GetItemBalance(nonConsItemId) > 0;
#else
return false;
#endif
}
virtual protected void _addNonConsumableItem(string nonConsItemId) {
#if UNITY_EDITOR
if (!NonConsumableItemExists(nonConsItemId)) {
GiveItem(nonConsItemId, 1);
}
#endif
}
virtual protected void _removeNonConsumableItem(string nonConsItemId) {
#if UNITY_EDITOR
TakeItem(nonConsItemId, 1);
#endif
}
#if (!UNITY_IOS && !UNITY_ANDROID) || UNITY_EDITOR
private static void NotifyChange(VirtualItem item, int amount, int change) {
string changeHash = item.ItemId + "#SOOM#" + amount + "#SOOM#" + change;
if (item is VirtualCurrency)
StoreEventsInstance.onCurrencyBalanceChanged(changeHash);
else if (item is VirtualGood)
StoreEventsInstance.onGoodBalanceChanged(changeHash);
}
private static T RequireItem<T>(string itemId, string lookupBy = "ItemId") where T : VirtualItem {
T virtualItem = StoreInfo.GetItemByItemId(itemId) as T;
if (virtualItem == null)
throw new VirtualItemNotFoundException(lookupBy, itemId);
return virtualItem;
}
private static VirtualItem RequireItem(string itemId, string lookupBy = "ItemId") {
return RequireItem<VirtualItem>(itemId, lookupBy);
}
#endif |
<<<<<<<
instance._initialize(storeAssets);
=======
// SoomlaUtils.LogDebug(TAG, "Adding currency");
JSONObject currencies = new JSONObject(JSONObject.Type.ARRAY);
foreach(VirtualCurrency vi in storeAssets.GetCurrencies()) {
currencies.Add(vi.toJSONObject());
}
// SoomlaUtils.LogDebug(TAG, "Adding packs");
JSONObject packs = new JSONObject(JSONObject.Type.ARRAY);
foreach(VirtualCurrencyPack vi in storeAssets.GetCurrencyPacks()) {
packs.Add(vi.toJSONObject());
}
// SoomlaUtils.LogDebug(TAG, "Adding goods");
JSONObject suGoods = new JSONObject(JSONObject.Type.ARRAY);
JSONObject ltGoods = new JSONObject(JSONObject.Type.ARRAY);
JSONObject eqGoods = new JSONObject(JSONObject.Type.ARRAY);
JSONObject upGoods = new JSONObject(JSONObject.Type.ARRAY);
JSONObject paGoods = new JSONObject(JSONObject.Type.ARRAY);
foreach(VirtualGood g in storeAssets.GetGoods()){
if (g is SingleUseVG) {
suGoods.Add(g.toJSONObject());
} else if (g is EquippableVG) {
eqGoods.Add(g.toJSONObject());
} else if (g is UpgradeVG) {
upGoods.Add(g.toJSONObject());
} else if (g is LifetimeVG) {
ltGoods.Add(g.toJSONObject());
} else if (g is SingleUsePackVG) {
paGoods.Add(g.toJSONObject());
}
}
JSONObject goods = new JSONObject(JSONObject.Type.OBJECT);
goods.AddField(JSONConsts.STORE_GOODS_SU, suGoods);
goods.AddField(JSONConsts.STORE_GOODS_LT, ltGoods);
goods.AddField(JSONConsts.STORE_GOODS_EQ, eqGoods);
goods.AddField(JSONConsts.STORE_GOODS_UP, upGoods);
goods.AddField(JSONConsts.STORE_GOODS_PA, paGoods);
// SoomlaUtils.LogDebug(TAG, "Adding categories");
JSONObject categories = new JSONObject(JSONObject.Type.ARRAY);
foreach(VirtualCategory vi in storeAssets.GetCategories()) {
categories.Add(vi.toJSONObject());
}
// SoomlaUtils.LogDebug(TAG, "Preparing StoreAssets JSONObject");
JSONObject storeAssetsObj = new JSONObject(JSONObject.Type.OBJECT);
storeAssetsObj.AddField(JSONConsts.STORE_CATEGORIES, categories);
storeAssetsObj.AddField(JSONConsts.STORE_CURRENCIES, currencies);
storeAssetsObj.AddField(JSONConsts.STORE_CURRENCYPACKS, packs);
storeAssetsObj.AddField(JSONConsts.STORE_GOODS, goods);
string storeAssetsJSON = storeAssetsObj.print();
instance._initialize(storeAssets.GetVersion(), storeAssetsJSON);
>>>>>>>
instance._initialize(storeAssets);
<<<<<<<
VirtualItem item;
if (localVirtualItems != null && localVirtualItems.TryGetValue(itemId, out item)) {
return item;
}
Utils.LogDebug(TAG, "Trying to fetch an item with itemId: " + itemId);
=======
SoomlaUtils.LogDebug(TAG, "Trying to fetch an item with itemId: " + itemId);
>>>>>>>
VirtualItem item;
if (localVirtualItems != null && localVirtualItems.TryGetValue(itemId, out item)) {
return item;
}
SoomlaUtils.LogDebug(TAG, "Trying to fetch an item with itemId: " + itemId);
<<<<<<<
List<UpgradeVG> upgrades;
if (localGoodsUpgrades != null && localGoodsUpgrades.TryGetValue(goodItemId, out upgrades)) {
return upgrades;
}
Utils.LogDebug(TAG, "Trying to fetch upgrades for " + goodItemId);
=======
SoomlaUtils.LogDebug(TAG, "Trying to fetch upgrades for " + goodItemId);
>>>>>>>
List<UpgradeVG> upgrades;
if (localGoodsUpgrades != null && localGoodsUpgrades.TryGetValue(goodItemId, out upgrades)) {
return upgrades;
}
SoomlaUtils.LogDebug(TAG, "Trying to fetch upgrades for " + goodItemId);
<<<<<<<
if (localCurrencies != null) {
return localCurrencies.ToList();
}
Utils.LogDebug(TAG, "Trying to fetch currencies");
=======
SoomlaUtils.LogDebug(TAG, "Trying to fetch currencies");
>>>>>>>
if (localCurrencies != null) {
return localCurrencies.ToList();
}
SoomlaUtils.LogDebug(TAG, "Trying to fetch currencies");
<<<<<<<
if (localVirtualGoods != null) {
return localVirtualGoods.ToList();
}
Utils.LogDebug(TAG, "Trying to fetch goods");
=======
SoomlaUtils.LogDebug(TAG, "Trying to fetch goods");
>>>>>>>
if (localVirtualGoods != null) {
return localVirtualGoods.ToList();
}
SoomlaUtils.LogDebug(TAG, "Trying to fetch goods");
<<<<<<<
if (localCurrencyPacks != null) {
return localCurrencyPacks.ToList();
}
Utils.LogDebug(TAG, "Trying to fetch packs");
=======
SoomlaUtils.LogDebug(TAG, "Trying to fetch packs");
>>>>>>>
if (localCurrencyPacks != null) {
return localCurrencyPacks.ToList();
}
SoomlaUtils.LogDebug(TAG, "Trying to fetch packs");
<<<<<<<
/// Fetches the non consumable items of your game.
/// </summary>
/// <returns>All non consumable items.</returns>
public static List<NonConsumableItem> GetNonConsumableItems() {
if (localNonConsumableItems != null) {
return localNonConsumableItems.ToList();
}
Utils.LogDebug(TAG, "Trying to fetch noncons");
return instance._getNonConsumableItems();
}
/// <summary>
=======
>>>>>>>
<<<<<<<
if (localCategories != null) {
return localCategories.ToList();
}
Utils.LogDebug(TAG, "Trying to fetch categories");
=======
SoomlaUtils.LogDebug(TAG, "Trying to fetch categories");
>>>>>>>
if (localCategories != null) {
return localCategories.ToList();
}
SoomlaUtils.LogDebug(TAG, "Trying to fetch categories");
<<<<<<<
virtual protected List<NonConsumableItem> _getNonConsumableItems() {
#if UNITY_EDITOR
return localNonConsumableItems.ToList();
#else
return null;
#endif
}
=======
>>>>>>> |
<<<<<<<
else if (_lastExtractedLexem.Type == LexemType.EndOperator)
{
isCodeEntered = true;
BuildModuleBody();
}
else if (_lastExtractedLexem.Type == LexemType.Directive)
=======
else if(_lastExtractedLexem.Type == LexemType.PreprocessorDirective)
>>>>>>>
else if (_lastExtractedLexem.Type == LexemType.EndOperator)
{
isCodeEntered = true;
BuildModuleBody();
}
else if (_lastExtractedLexem.Type == LexemType.PreprocessorDirective) |
<<<<<<<
/// <summary>
/// Determines whether [is web socket request] by identifying the Upgrade: websocket header.
/// </summary>
/// <param name="request">The request.</param>
/// <returns>
/// <c>true</c> if [is web socket request] [the specified request]; otherwise, <c>false</c>.
/// </returns>
public static bool IsWebSocketRequest(this HttpListenerRequest request)
{
var upgradeKey = request.Headers.AllKeys.FirstOrDefault(k => k.ToLowerInvariant().Equals("upgrade"));
if (request.Headers[upgradeKey].Equals("websocket"))
return true;
return false;
}
=======
/// <summary>
/// Deletes the session object associated to the current context.
/// </summary>
/// <param name="context">The context.</param>
/// <param name="server">The server.</param>
/// <returns></returns>
public static void DeleteSession(this HttpListenerContext context, WebServer server)
{
server.SessionModule?.DeleteSession(context);
}
/// <summary>
/// Deletes the session object associated to the current context.
/// </summary>
/// <param name="server">The server.</param>
/// <param name="context">The context.</param>
/// <returns></returns>
public static void DeleteSession(this WebServer server, HttpListenerContext context)
{
server.SessionModule?.DeleteSession(context);
}
/// <summary>
/// Deletes the given session object.
/// </summary>
/// <param name="server">The server.</param>
/// <param name="session">The session info.</param>
/// <returns></returns>
public static void DeleteSession(this WebServer server, SessionInfo session)
{
server.SessionModule?.DeleteSession(session);
}
>>>>>>>
/// <summary>
/// Deletes the session object associated to the current context.
/// </summary>
/// <param name="context">The context.</param>
/// <param name="server">The server.</param>
/// <returns></returns>
public static void DeleteSession(this HttpListenerContext context, WebServer server)
{
server.SessionModule?.DeleteSession(context);
}
/// <summary>
/// Deletes the session object associated to the current context.
/// </summary>
/// <param name="server">The server.</param>
/// <param name="context">The context.</param>
/// <returns></returns>
public static void DeleteSession(this WebServer server, HttpListenerContext context)
{
server.SessionModule?.DeleteSession(context);
}
/// <summary>
/// Deletes the given session object.
/// </summary>
/// <param name="server">The server.</param>
/// <param name="session">The session info.</param>
/// <returns></returns>
public static void DeleteSession(this WebServer server, SessionInfo session)
{
server.SessionModule?.DeleteSession(session);
}
/// <summary>
/// Determines whether [is web socket request] by identifying the Upgrade: websocket header.
/// </summary>
/// <param name="request">The request.</param>
/// <returns>
/// <c>true</c> if [is web socket request] [the specified request]; otherwise, <c>false</c>.
/// </returns>
public static bool IsWebSocketRequest(this HttpListenerRequest request)
{
var upgradeKey = request.Headers.AllKeys.FirstOrDefault(k => k.ToLowerInvariant().Equals("upgrade"));
if (request.Headers[upgradeKey].Equals("websocket"))
return true;
return false;
} |
<<<<<<<
context.Install(typeof(ViewProcessorMapExtension));
context.Install(typeof(StageCrawlerExtension));
=======
// context.Install(typeof(ViewProcessorMapExtension));
>>>>>>>
context.Install(typeof(ViewProcessorMapExtension)); |
<<<<<<<
public Vector3 Direction;
public float Pad;
=======
public Vector3 Direction;
public float pad;
>>>>>>>
public Vector3 Direction;
public float pad;
public float Pad;
<<<<<<<
public Vector3 Attenuation;
public float Pad;
=======
public Vector3 Attenuation;
public float pad;
>>>>>>>
public Vector3 Attenuation;
public float Pad;
<<<<<<<
public Vector3 Attenuation;
public float Pad;
=======
public Vector3 Attenuation;
public float pad;
>>>>>>>
public Vector3 Attenuation;
public float Pad; |
<<<<<<<
using API.Traffic.Data;
using API.Traffic.Enums;
=======
using System;
using System.Collections.Generic;
using TrafficManager.API.Traffic.Data;
using TrafficManager.API.Traffic.Enums;
using TrafficManager.Manager.Impl;
using GenericGameBridge.Service;
>>>>>>>
<<<<<<<
=======
using TrafficManager.State;
>>>>>>>
<<<<<<<
=======
using TrafficManager.API.Manager;
using TrafficManager.UI.SubTools.PrioritySigns;
>>>>>>>
<<<<<<<
public static IRecordable FixPrioritySigns
(PrioritySignsMassEditMode massEditMode, List<ushort> segmentList) {
=======
public static void FixPrioritySigns(
PrioritySignsTool.PrioritySignsMassEditMode massEditMode,
List<ushort> segmentList)
{
>>>>>>>
public static IRecordable FixPrioritySigns(
PrioritySignsTool.PrioritySignsMassEditMode massEditMode,
List<ushort> segmentList) {
<<<<<<<
if (srcLaneCount > 0 && bnear && turnArrow == LaneArrows.Forward) {
LaneArrowManager.Instance.AddLaneArrows(
=======
if(srcLaneCount > 0 && bnear && turnArrow == LaneArrows.Forward) {
LaneArrowManager.Instance.AddLaneArrows(
>>>>>>>
if (srcLaneCount > 0 && bnear && turnArrow == LaneArrows.Forward) {
LaneArrowManager.Instance.AddLaneArrows( |
<<<<<<<
ParameterTypes = methodExecutor.MethodParameters.Select(GetParameterType).ToArray();
Policies = policies.ToArray();
=======
>>>>>>>
<<<<<<<
private Type GetParameterType(ParameterInfo p)
{
var type = p.ParameterType;
if (ReflectionHelper.IsStreamingType(type))
{
HasStreamingParameters = true;
return typeof(StreamPlaceholder);
}
return type;
}
=======
public bool HasSyntheticArguments { get; private set; }
>>>>>>>
public bool HasSyntheticArguments { get; private set; }
private Type GetParameterType(ParameterInfo p)
{
var type = p.ParameterType;
if (ReflectionHelper.IsStreamingType(type))
{
HasStreamingParameters = true;
return typeof(StreamPlaceholder);
}
return type;
} |
<<<<<<<
bufferItemEndA.m_laneID = this._endLaneA;
bufferItemEndA.m_position = data.m_position01;
this.GetLaneDirection(data.m_position01, out bufferItemEndA.m_direction, out bufferItemEndA.m_lanesUsed);
bufferItemEndA.m_methodDistance = 0f;
bufferItemEndA.m_comparisonValue = 0f;
bufferItemEndA.m_numSegmentsToJunction = 0;
=======
bufferItemEndA.m_laneID = this._endLaneA;
bufferItemEndA.m_position = data.m_position01;
this.GetLaneDirection(data.m_position01, out bufferItemEndA.m_direction, out bufferItemEndA.m_lanesUsed);
bufferItemEndA.m_methodDistance = 0f;
bufferItemEndA.m_comparisonValue = 0f;
>>>>>>>
bufferItemEndA.m_laneID = this._endLaneA;
bufferItemEndA.m_position = data.m_position01;
this.GetLaneDirection(data.m_position01, out bufferItemEndA.m_direction, out bufferItemEndA.m_lanesUsed);
bufferItemEndA.m_methodDistance = 0f;
bufferItemEndA.m_comparisonValue = 0f;
bufferItemEndA.m_numSegmentsToJunction = 0;
<<<<<<<
bufferItemEndB.m_laneID = this._endLaneB;
bufferItemEndB.m_position = data.m_position03;
this.GetLaneDirection(data.m_position03, out bufferItemEndB.m_direction, out bufferItemEndB.m_lanesUsed);
bufferItemEndB.m_methodDistance = 0f;
bufferItemEndB.m_comparisonValue = 0f;
bufferItemEndB.m_numSegmentsToJunction = 0;
=======
bufferItemEndB.m_laneID = this._endLaneB;
bufferItemEndB.m_position = data.m_position03;
this.GetLaneDirection(data.m_position03, out bufferItemEndB.m_direction, out bufferItemEndB.m_lanesUsed);
bufferItemEndB.m_methodDistance = 0f;
bufferItemEndB.m_comparisonValue = 0f;
>>>>>>>
bufferItemEndB.m_laneID = this._endLaneB;
bufferItemEndB.m_position = data.m_position03;
this.GetLaneDirection(data.m_position03, out bufferItemEndB.m_direction, out bufferItemEndB.m_lanesUsed);
bufferItemEndB.m_methodDistance = 0f;
bufferItemEndB.m_comparisonValue = 0f;
bufferItemEndB.m_numSegmentsToJunction = 0;
<<<<<<<
BufferItem bufferItem = default(BufferItem);
byte b = 0;
=======
BufferItem curBufferItem = default(BufferItem);
byte startOffset = 0;
>>>>>>>
BufferItem curBufferItem = default(BufferItem);
byte startOffset = 0;
<<<<<<<
float num8 = bufferItem.m_comparisonValue * this._maxLength;
=======
float num8 = curBufferItem.m_comparisonValue * this._maxLength;
>>>>>>>
float num8 = curBufferItem.m_comparisonValue * this._maxLength;
<<<<<<<
PathUnit.Position position = bufferItem.m_position;
if ((position.m_segment != bufferItemEndA.m_position.m_segment || position.m_lane != bufferItemEndA.m_position.m_lane || position.m_offset != bufferItemEndA.m_position.m_offset) && (position.m_segment != bufferItemEndB.m_position.m_segment || position.m_lane != bufferItemEndB.m_position.m_lane || position.m_offset != bufferItemEndB.m_position.m_offset)) {
if (b != position.m_offset) {
=======
PathUnit.Position position = curBufferItem.m_position;
if ((position.m_segment != bufferItemEndA.m_position.m_segment || position.m_lane != bufferItemEndA.m_position.m_lane || position.m_offset != bufferItemEndA.m_position.m_offset) && (position.m_segment != bufferItemEndB.m_position.m_segment || position.m_lane != bufferItemEndB.m_position.m_lane || position.m_offset != bufferItemEndB.m_position.m_offset)) {
if (startOffset != position.m_offset) {
>>>>>>>
PathUnit.Position position = curBufferItem.m_position;
if ((position.m_segment != bufferItemEndA.m_position.m_segment || position.m_lane != bufferItemEndA.m_position.m_lane || position.m_offset != bufferItemEndA.m_position.m_offset) && (position.m_segment != bufferItemEndB.m_position.m_segment || position.m_lane != bufferItemEndB.m_position.m_lane || position.m_offset != bufferItemEndB.m_position.m_offset)) {
if (startOffset != position.m_offset) {
<<<<<<<
position = this._laneTarget[(int)((UIntPtr)bufferItem.m_laneID)];
=======
position = this._laneTarget[(int)((UIntPtr)curBufferItem.m_laneID)];
>>>>>>>
position = this._laneTarget[(int)((UIntPtr)curBufferItem.m_laneID)];
<<<<<<<
private void ProcessItem(BufferItem item, ushort targetNodeId, bool targetDisabled, ushort nextSegmentId, ref NetSegment nextSegment, uint lane, byte offset, byte connectOffset) {
if ((nextSegment.m_flags & (NetSegment.Flags.PathFailed | NetSegment.Flags.Flooded)) != NetSegment.Flags.None) {
=======
private void ProcessItem(BufferItem item, ushort targetNode, bool targetDisabled, ushort segmentID, ref NetSegment nextSegment, uint lane, byte offset, byte connectOffset) {
if ((nextSegment.m_flags & (NetSegment.Flags.PathFailed | NetSegment.Flags.Flooded)) != NetSegment.Flags.None) {
>>>>>>>
private void ProcessItem(BufferItem item, ushort targetNodeId, bool targetDisabled, ushort nextSegmentId, ref NetSegment nextSegment, uint lane, byte offset, byte connectOffset) {
if ((nextSegment.m_flags & (NetSegment.Flags.PathFailed | NetSegment.Flags.Flooded)) != NetSegment.Flags.None) {
<<<<<<<
NetInfo nextSegmentInfo = nextSegment.Info;
NetInfo prevSegmentInfo = instance.m_segments.m_buffer[(int)item.m_position.m_segment].Info;
int num = nextSegmentInfo.m_lanes.Length;
uint num2 = nextSegment.m_lanes;
=======
NetInfo info = nextSegment.Info;
NetInfo info2 = instance.m_segments.m_buffer[(int)item.m_position.m_segment].Info;
int nextNumLanes = info.m_lanes.Length;
uint curLaneId = nextSegment.m_lanes;
>>>>>>>
NetInfo nextSegmentInfo = nextSegment.Info;
NetInfo prevSegmentInfo = instance.m_segments.m_buffer[(int)item.m_position.m_segment].Info;
int nextNumLanes = nextSegmentInfo.m_lanes.Length;
uint curLaneId = nextSegment.m_lanes;
<<<<<<<
int num8 = 0;
while (num8 < num && num2 != 0u) {
if (lane == num2) {
NetInfo.Lane lane3 = nextSegmentInfo.m_lanes[num8];
=======
int laneIndex = 0;
while (laneIndex < nextNumLanes && curLaneId != 0u) {
if (lane == curLaneId) {
NetInfo.Lane lane3 = info.m_lanes[laneIndex];
>>>>>>>
int laneIndex = 0;
while (laneIndex < nextNumLanes && curLaneId != 0u) {
if (lane == curLaneId) {
NetInfo.Lane lane3 = nextSegmentInfo.m_lanes[laneIndex];
<<<<<<<
// NON-STOCK CODE START //
if (prevIsJunction)
item2.m_numSegmentsToJunction = 1;
else if (nextIsJunction)
item2.m_numSegmentsToJunction = 0;
else
item2.m_numSegmentsToJunction = item.m_numSegmentsToJunction + 1;
// NON-STOCK CODE END //
item2.m_position.m_segment = nextSegmentId;
item2.m_position.m_lane = (byte)num8;
=======
item2.m_position.m_segment = segmentID;
item2.m_position.m_lane = (byte)laneIndex;
>>>>>>>
// NON-STOCK CODE START //
if (prevIsJunction)
item2.m_numSegmentsToJunction = 1;
else if (nextIsJunction)
item2.m_numSegmentsToJunction = 0;
else
item2.m_numSegmentsToJunction = item.m_numSegmentsToJunction + 1;
// NON-STOCK CODE END //
item2.m_position.m_segment = nextSegmentId;
item2.m_position.m_lane = (byte)laneIndex;
<<<<<<<
private bool ProcessItem(BufferItem item, ushort targetNode, ushort segmentID, ref NetSegment segment, ref int currentTargetIndex, byte connectOffset, bool enableVehicle, bool enablePedestrian) {
bool foundForced = false;
return ProcessItem(item, targetNode, segmentID, ref segment, ref currentTargetIndex, connectOffset, enableVehicle, enablePedestrian, null, null, out foundForced);
=======
private bool ProcessItem(bool debug, BufferItem item, ushort targetNode, ushort segmentID, ref NetSegment segment, ref int laneIndexFromLeft, byte connectOffset, bool enableVehicle, bool enablePedestrian) {
return ProcessItem(debug, item, targetNode, segmentID, ref segment, ref laneIndexFromLeft, connectOffset, enableVehicle, enablePedestrian, null, null);
>>>>>>>
private bool ProcessItem(bool debug, BufferItem item, ushort targetNode, ushort segmentID, ref NetSegment segment, ref int laneIndexFromLeft, byte connectOffset, bool enableVehicle, bool enablePedestrian) {
bool foundForced = false;
return ProcessItem(debug, item, targetNode, segmentID, ref segment, ref laneIndexFromLeft, connectOffset, enableVehicle, enablePedestrian, null, null, out foundForced);
<<<<<<<
private bool ProcessItem(BufferItem item, ushort targetNodeId, ushort segmentID, ref NetSegment nextSegment, ref int currentTargetIndex, byte connectOffset, bool enableVehicle, bool enablePedestrian, int? forceLaneIndex, uint? forceLaneId, out bool foundForced) {
foundForced = false;
=======
private bool ProcessItem(bool debug, BufferItem item, ushort targetNode, ushort segmentID, ref NetSegment nextSegment, ref int laneIndexFromLeft, byte connectOffset, bool enableVehicle, bool enablePedestrian, int? forceLaneIndex, uint? forceLaneId) {
>>>>>>>
private bool ProcessItem(bool debug, BufferItem item, ushort targetNodeId, ushort segmentID, ref NetSegment nextSegment, ref int laneIndexFromLeft, byte connectOffset, bool enableVehicle, bool enablePedestrian, int? forceLaneIndex, uint? forceLaneId, out bool foundForced) {
foundForced = false;
<<<<<<<
int num11 = currentTargetIndex;
bool transitionNode = (instance.m_nodes.m_buffer[(int)targetNodeId].m_flags & NetNode.Flags.Transition) != NetNode.Flags.None;
=======
int num11 = laneIndexFromLeft;
bool flag = (instance.m_nodes.m_buffer[(int)targetNode].m_flags & NetNode.Flags.Transition) != NetNode.Flags.None;
>>>>>>>
int num11 = laneIndexFromLeft;
bool transitionNode = (instance.m_nodes.m_buffer[(int)targetNodeId].m_flags & NetNode.Flags.Transition) != NetNode.Flags.None;
<<<<<<<
if (currentTargetIndex < firstTarget || currentTargetIndex >= lastTarget) {
item2.m_comparisonValue += Mathf.Max(1f, distanceOnBezier * 3f - 3f) / ((maxSpeed + nextLane.m_speedLimit) * 0.5f * this._maxLength);
=======
if (laneIndexFromLeft < firstTarget || laneIndexFromLeft >= lastTarget) {
item2.m_comparisonValue += Mathf.Max(1f, num13 * 3f - 3f) / ((num5 + nextLane.m_speedLimit) * 0.5f * this._maxLength);
>>>>>>>
if (laneIndexFromLeft < firstTarget || laneIndexFromLeft >= lastTarget) {
item2.m_comparisonValue += Mathf.Max(1f, distanceOnBezier * 3f - 3f) / ((maxSpeed + nextLane.m_speedLimit) * 0.5f * this._maxLength);
<<<<<<<
// NON-STOCK CODE START //
if (customLaneChanging && forceLaneIndex == null && nextLane.m_similarLaneCount > 1) {
int nextRightSimilarLaneIndex;
if ((byte)(nextLane.m_direction & normDirection) != 0) {
nextRightSimilarLaneIndex = nextLane.m_similarLaneIndex;
} else {
nextRightSimilarLaneIndex = nextLane.m_similarLaneCount - nextLane.m_similarLaneIndex - 1;
}
if (changeLane) {
// calculate current similar lane index starting from right lane
if (Math.Abs(nextRightSimilarLaneIndex - prevRightSimilarLaneIndex) == 1) {
// reward for changing to adjacent (+-1) lane
item2.m_comparisonValue -= 0.5f;
}/* else if (nextRightSimilarLaneIndex == prevRightSimilarLaneIndex) {
// punishment for staying on lane
item2.m_comparisonValue += 1f;
}*/
} else {
if (nextRightSimilarLaneIndex == prevRightSimilarLaneIndex) {
// reward for staying on lane
if (nextIsHighway) {
// on highway: high reward for staying on lane
item2.m_comparisonValue -= 1f;
} else {
// on road: reward depends on traffic density (higher density => more cars stay on lane)
item2.m_comparisonValue -= density;
}
} else {
// punishment for changing lane
float junctionCost = 0f;
if (nextIsHighway) {
// on highways: vehicles should switch lanes 2-3 segments before an exit
if (item2.m_numSegmentsToJunction <= _pathRandomizer.Int32(1, 3))
junctionCost = 0.5f;
else if (item2.m_numSegmentsToJunction > _pathRandomizer.Int32(2, 4))
junctionCost = 0.1f * (float)Math.Max(0, 10 - item2.m_numSegmentsToJunction);
} else {
// on roads: vehicles should not switch lane before junctions
junctionCost = 0.5f * (float)Math.Max(0, 10 - item2.m_numSegmentsToJunction);
}
float laneDist = density * Math.Abs(nextRightSimilarLaneIndex - prevRightSimilarLaneIndex);
item2.m_comparisonValue += laneDist + junctionCost;
}
}
item2.m_comparisonValue = Math.Max(0f, item2.m_comparisonValue);
}
if (forceLaneIndex != null && laneIndex == forceLaneIndex)
foundForced = true;
// NON-STOCK CODE END //
=======
#if DEBUG
if (debug) {
Log.Message($">> Adding item: seg {item2.m_position.m_segment}, lane {item2.m_position.m_lane} (idx {item2.m_laneID}), off {item2.m_position.m_offset}, cost {item2.m_comparisonValue}");
}
#endif
>>>>>>>
// NON-STOCK CODE START //
if (customLaneChanging && forceLaneIndex == null && nextLane.m_similarLaneCount > 1) {
int nextRightSimilarLaneIndex;
if ((byte)(nextLane.m_direction & normDirection) != 0) {
nextRightSimilarLaneIndex = nextLane.m_similarLaneIndex;
} else {
nextRightSimilarLaneIndex = nextLane.m_similarLaneCount - nextLane.m_similarLaneIndex - 1;
}
if (changeLane) {
// calculate current similar lane index starting from right lane
if (Math.Abs(nextRightSimilarLaneIndex - prevRightSimilarLaneIndex) == 1) {
// reward for changing to adjacent (+-1) lane
item2.m_comparisonValue -= 0.5f;
}/* else if (nextRightSimilarLaneIndex == prevRightSimilarLaneIndex) {
// punishment for staying on lane
item2.m_comparisonValue += 1f;
}*/
} else {
if (nextRightSimilarLaneIndex == prevRightSimilarLaneIndex) {
// reward for staying on lane
if (nextIsHighway) {
// on highway: high reward for staying on lane
item2.m_comparisonValue -= 1f;
} else {
// on road: reward depends on traffic density (higher density => more cars stay on lane)
item2.m_comparisonValue -= density;
}
} else {
// punishment for changing lane
float junctionCost = 0f;
if (nextIsHighway) {
// on highways: vehicles should switch lanes 2-3 segments before an exit
if (item2.m_numSegmentsToJunction <= _pathRandomizer.Int32(1, 3))
junctionCost = 0.5f;
else if (item2.m_numSegmentsToJunction > _pathRandomizer.Int32(2, 4))
junctionCost = 0.1f * (float)Math.Max(0, 10 - item2.m_numSegmentsToJunction);
} else {
// on roads: vehicles should not switch lane before junctions
junctionCost = 0.5f * (float)Math.Max(0, 10 - item2.m_numSegmentsToJunction);
}
float laneDist = density * Math.Abs(nextRightSimilarLaneIndex - prevRightSimilarLaneIndex);
item2.m_comparisonValue += laneDist + junctionCost;
}
}
item2.m_comparisonValue = Math.Max(0f, item2.m_comparisonValue);
}
if (forceLaneIndex != null && laneIndex == forceLaneIndex)
foundForced = true;
if (debug) {
Log.Message($">> Adding item: seg {item2.m_position.m_segment}, lane {item2.m_position.m_lane} (idx {item2.m_laneID}), off {item2.m_position.m_offset}, cost {item2.m_comparisonValue}");
}
// NON-STOCK CODE END // |
<<<<<<<
public const int ConflictingPackageReferenceVersions = 4002;
public const int DependenciesFileDoesNotExist = 4003;
public const int PackageVersionNotFoundInLineup = 4004;
public const int PackageRefHasLiteralVersion = 4005;
public const int VariableNotFoundInDependenciesPropsFile = 4006;
public const int PackageRefHasFloatingVersion = 4007;
public const int PackageRefPropertyGroupNotFound = 4008;
public const int PackageReferenceDoesNotHaveVersion = 4009;
public const int InvalidPackageVersion = 4010;
=======
public const int NuspecMissingFilesNode = 4011;
public const int InvalidPackagePathMetadata = 4012;
>>>>>>>
public const int ConflictingPackageReferenceVersions = 4002;
public const int DependenciesFileDoesNotExist = 4003;
public const int PackageVersionNotFoundInLineup = 4004;
public const int PackageRefHasLiteralVersion = 4005;
public const int VariableNotFoundInDependenciesPropsFile = 4006;
public const int PackageRefHasFloatingVersion = 4007;
public const int PackageRefPropertyGroupNotFound = 4008;
public const int PackageReferenceDoesNotHaveVersion = 4009;
public const int InvalidPackageVersion = 4010;
public const int NuspecMissingFilesNode = 4011;
public const int InvalidPackagePathMetadata = 4012; |
<<<<<<<
new PackageSigningRule(),
new PrereleaseDependenciesVersionRule(),
=======
>>>>>>>
new PackageSigningRule(), |
<<<<<<<
#elif NETCOREAPP3_0
=======
#elif NETCOREAPP2_1 || NETSTANDARD2_0
>>>>>>>
#elif NETCOREAPP3_0 || NETSTANDARD2_0 |
<<<<<<<
public BodyScannedEvent(DateTime timestamp, string name, string bodyclass, decimal gravity, decimal temperature, decimal pressure, bool tidallylocked, bool landable, string atmosphere, Volcanism volcanism, decimal distancefromarrival, decimal orbitalperiod, decimal rotationperiod, decimal? semimajoraxis, decimal? eccentricity, decimal? orbitalinclination, decimal? periapsis, List<Ring> rings, List<MaterialPresence> materials, string terraformState) : base(timestamp, NAME)
=======
public BodyScannedEvent(DateTime timestamp, string name, string bodyclass, decimal gravity, decimal? temperature, decimal? pressure, bool? tidallylocked, bool? landable, string atmosphere, string volcanism, decimal distancefromarrival, decimal orbitalperiod, decimal rotationperiod, decimal? semimajoraxis, decimal? eccentricity, decimal? orbitalinclination, decimal? periapsis, List<Ring> rings, List<MaterialPresence> materials, string terraformState) : base(timestamp, NAME)
>>>>>>>
public BodyScannedEvent(DateTime timestamp, string name, string bodyclass, decimal gravity, decimal? temperature, decimal? pressure, bool? tidallylocked, bool? landable, string atmosphere, Volcanism volcanism, decimal distancefromarrival, decimal orbitalperiod, decimal rotationperiod, decimal? semimajoraxis, decimal? eccentricity, decimal? orbitalinclination, decimal? periapsis, List<Ring> rings, List<MaterialPresence> materials, string terraformState) : base(timestamp, NAME) |
<<<<<<<
Assert.AreEqual(0.94775, (double)theEvent.solarradius, 0.01);
=======
Assert.AreEqual(theEvent.radius, (decimal)659162816.0);
Assert.AreEqual(theEvent.solarradius, StarClass.solarradius((decimal)659162816.000000));
>>>>>>>
Assert.AreEqual(theEvent.radius, (decimal)659162816.0);
Assert.AreEqual(theEvent.solarradius, StarClass.solarradius((decimal)659162816.000000));
Assert.AreEqual(0.94775, (double)theEvent.solarradius, 0.01); |
<<<<<<<
Case(@"finally@@{`boom!` ;}", A(TT.Id, TT.At, TT.At, TT.LBrace, TT.BQOperator, TT.Semicolon, TT.RBrace),
_("finally"), _(""), _(""), null, _("boom!"), _(";"), null);
=======
Case(@"finally@@{`boom!` ;}", A(TT.Id, TT.At, TT.At, TT.LBrace, TT.BQString, TT.Semicolon, TT.RBrace),
_("finally"), _(""), _(""), null, _("boom!"), _("';"), null);
>>>>>>>
Case(@"finally@@{`boom!` ;}", A(TT.Id, TT.At, TT.At, TT.LBrace, TT.BQOperator, TT.Semicolon, TT.RBrace),
_("finally"), _(""), _(""), null, _("boom!"), _("';"), null);
<<<<<<<
Case(@"%", A(TT.NormalOp), _(@"%"));
Case("`backquoted`x", A(TT.BQOperator, TT.Id), _("backquoted"), _("x"));
=======
Case(@"%", A(TT.NormalOp), _(@"'%"));
Case("`backquoted`x", A(TT.BQString, TT.Id), _("backquoted"), _("x"));
>>>>>>>
Case(@"%", A(TT.NormalOp), _(@"'%"));
Case("`backquoted`x", A(TT.BQOperator, TT.Id), _("backquoted"), _("x"));
<<<<<<<
Case("0x!0b", A(TT.Literal, TT.Not, TT.Literal), ERROR, _("!"), ERROR);
Case("`weird\nnewline", A(TT.BQOperator, TT.Newline, TT.Id), ERROR, WS, _("newline"));
=======
Case("0x!0b", A(TT.Literal, TT.Not, TT.Literal), ERROR, _("'!"), ERROR);
Case("`weird\nnewline", A(TT.BQString, TT.Newline, TT.Id), ERROR, WS, _("newline"));
>>>>>>>
Case("0x!0b", A(TT.Literal, TT.Not, TT.Literal), ERROR, _("'!"), ERROR);
Case("`weird\nnewline", A(TT.BQOperator, TT.Newline, TT.Id), ERROR, WS, _("newline")); |
<<<<<<<
Exact(@"123;", F.Literal(123));
Exact(@"(123);", F.InParens(F.Literal(123)));
Exact(@"123uL;", F.Literal(123uL));
Exact(@"123.25;", F.Literal(123.25));
Exact(@"123.25f;", F.Literal(123.25f));
=======
Exact(@"123", F.Literal(123));
// Exact(@"123z", F.Literal(new BigInteger(123)));
Exact(@"(123)", F.InParens(F.Literal(123)));
Exact(@"123uL", F.Literal(123uL));
Exact(@"123.25", F.Literal(123.25));
Exact(@"123.25f", F.Literal(123.25f));
>>>>>>>
Exact(@"123;", F.Literal(123));
Exact(@"(123);", F.InParens(F.Literal(123)));
// Exact(@"123z", F.Literal(new BigInteger(123)));
Exact(@"123uL;", F.Literal(123uL));
Exact(@"123.25;", F.Literal(123.25));
Exact(@"123.25f;", F.Literal(123.25f)); |
<<<<<<<
private System.Windows.Forms.TextBox txtAzureStorageUploadPath;
private System.Windows.Forms.Label lblAzureStorageUploadPath;
private System.Windows.Forms.CheckBox cbAzureStorageExcludeContainer;
=======
private System.Windows.Forms.Label lblFirebaseDomain;
>>>>>>>
private System.Windows.Forms.TextBox txtAzureStorageUploadPath;
private System.Windows.Forms.Label lblAzureStorageUploadPath;
private System.Windows.Forms.CheckBox cbAzureStorageExcludeContainer;
private System.Windows.Forms.Label lblFirebaseDomain; |
<<<<<<<
private System.Windows.Forms.TabPage tpGist;
private GUI.AccountTypeControl atcGistAccountType;
private GUI.OAuth2Control oAuth2Gist;
=======
private System.Windows.Forms.Button btnCustomUploaderImport;
private System.Windows.Forms.Button btnCustomUploaderExport;
>>>>>>>
private System.Windows.Forms.TabPage tpGist;
private GUI.AccountTypeControl atcGistAccountType;
private GUI.OAuth2Control oAuth2Gist;
private System.Windows.Forms.Button btnCustomUploaderImport;
private System.Windows.Forms.Button btnCustomUploaderExport; |
<<<<<<<
this.lblTeknikUrlShortenerAPIUrl = new System.Windows.Forms.Label();
this.tbTeknikUrlShortenerAPIUrl = new System.Windows.Forms.TextBox();
this.tscCustomUploaderResponseText.ContentPanel.SuspendLayout();
this.tscCustomUploaderResponseText.TopToolStripPanel.SuspendLayout();
this.tscCustomUploaderResponseText.SuspendLayout();
this.tsCustomUploaderResponseText.SuspendLayout();
=======
>>>>>>>
this.lblTeknikUrlShortenerAPIUrl = new System.Windows.Forms.Label();
this.tbTeknikUrlShortenerAPIUrl = new System.Windows.Forms.TextBox();
<<<<<<<
private System.Windows.Forms.Button btnCustomUploaderNew;
private System.Windows.Forms.Label lblCustomUploaderDestinationType;
private System.Windows.Forms.TabControl tcCustomUploader;
private System.Windows.Forms.TabPage tpCustomUploaderRequest;
private System.Windows.Forms.TabPage tpCustomUploaderResponse;
private System.Windows.Forms.TabPage tpCustomUploaderTest;
private System.Windows.Forms.Label lblCustomUploaderHeaders;
private System.Windows.Forms.Label lblCustomUploaderParameters;
private System.Windows.Forms.Panel pCustomUploaderParameterValue;
private System.Windows.Forms.RichTextBox rtbCustomUploaderParameterValue;
private System.Windows.Forms.Button btnCustomUploaderParameterUpdate;
private System.Windows.Forms.TextBox txtCustomUploaderParameterName;
private System.Windows.Forms.Button btnCustomUploaderParameterAdd;
private System.Windows.Forms.Button btnCustomUploaderParameterRemove;
private HelpersLib.MyListView lvCustomUploaderParameters;
private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.ColumnHeader columnHeader2;
private System.Windows.Forms.Panel pCustomUploaderBodyArguments;
private System.Windows.Forms.Panel pCustomUploaderBodyData;
private System.Windows.Forms.TextBox txtCustomUploaderResponse;
private System.Windows.Forms.TabControl tcCustomUploaderTest;
private System.Windows.Forms.TabPage tpCustomUploaderResult;
private System.Windows.Forms.TabPage tpCustomUploaderResponseText;
private System.Windows.Forms.Button btnCustomUploaderHelp;
private System.Windows.Forms.ContextMenuStrip cmsCustomUploaderHelp;
private System.Windows.Forms.ToolStripMenuItem tsmiCustomUploaderGuide;
private System.Windows.Forms.ToolStripMenuItem tsmiCustomUploaderExamples;
private System.Windows.Forms.ToolStripMenuItem tsmiCustomUploaderExportAll;
private System.Windows.Forms.ToolStripContainer tscCustomUploaderResponseText;
private System.Windows.Forms.ToolStrip tsCustomUploaderResponseText;
private System.Windows.Forms.ToolStripButton tsbCustomUploaderJSONFormat;
private System.Windows.Forms.ToolStripButton tsbCustomUploaderXMLFormat;
private System.Windows.Forms.ToolStripButton tsbCustomUploaderCopyResponseText;
private System.Windows.Forms.CheckBox cbTeknikGenDeleteKey;
private System.Windows.Forms.CheckBox cbTeknikEncrypt;
private System.Windows.Forms.Label lblTeknikUploadAPIUrl;
private System.Windows.Forms.TextBox tbTeknikUploadAPIUrl;
private OAuthControl oauthTeknik;
private System.Windows.Forms.Label lblTeknikAuthUrl;
private System.Windows.Forms.TextBox tbTeknikAuthUrl;
internal System.Windows.Forms.TabPage tpTeknik;
private System.Windows.Forms.Label lblTeknikPasteAPIUrl;
private System.Windows.Forms.TextBox tbTeknikPasteAPIUrl;
private System.Windows.Forms.Label lblTeknikUrlShortenerAPIUrl;
private System.Windows.Forms.TextBox tbTeknikUrlShortenerAPIUrl;
=======
private System.Windows.Forms.CheckBox cbGooglePhotosIsPublic;
private System.Windows.Forms.Label lblGooglePhotosCreateAlbumName;
private System.Windows.Forms.TextBox txtGooglePhotosCreateAlbumName;
private System.Windows.Forms.Button btnGooglePhotosCreateAlbum;
>>>>>>>
private System.Windows.Forms.CheckBox cbGooglePhotosIsPublic;
private System.Windows.Forms.Label lblGooglePhotosCreateAlbumName;
private System.Windows.Forms.TextBox txtGooglePhotosCreateAlbumName;
private System.Windows.Forms.Button btnGooglePhotosCreateAlbum;
private System.Windows.Forms.CheckBox cbTeknikGenDeleteKey;
private System.Windows.Forms.CheckBox cbTeknikEncrypt;
private System.Windows.Forms.Label lblTeknikUploadAPIUrl;
private System.Windows.Forms.TextBox tbTeknikUploadAPIUrl;
private OAuthControl oauthTeknik;
private System.Windows.Forms.Label lblTeknikAuthUrl;
private System.Windows.Forms.TextBox tbTeknikAuthUrl;
internal System.Windows.Forms.TabPage tpTeknik;
private System.Windows.Forms.Label lblTeknikPasteAPIUrl;
private System.Windows.Forms.TextBox tbTeknikPasteAPIUrl;
private System.Windows.Forms.Label lblTeknikUrlShortenerAPIUrl;
private System.Windows.Forms.TextBox tbTeknikUrlShortenerAPIUrl; |
<<<<<<<
internal System.Windows.Forms.TabPage tpBackblazeB2;
private System.Windows.Forms.TextBox txtB2CustomUrl;
private System.Windows.Forms.Label lblB2UrlPreview;
private System.Windows.Forms.CheckBox cbB2CustomUrl;
private System.Windows.Forms.Label lblB2Bucket;
private System.Windows.Forms.TextBox txtB2Bucket;
private System.Windows.Forms.TextBox txtB2UploadPath;
private System.Windows.Forms.Label lblB2UploadPath;
private System.Windows.Forms.TextBox txtB2ApplicationKey;
private System.Windows.Forms.Label lblB2ApplicationKey;
private System.Windows.Forms.Label lblB2ApplicationKeyId;
private System.Windows.Forms.TextBox txtB2ApplicationKeyId;
private System.Windows.Forms.TextBox txtB2UrlPreview;
private System.Windows.Forms.LinkLabel lblB2ManageLink;
=======
private System.Windows.Forms.Label lblOwnCloudExpiryTime;
private System.Windows.Forms.CheckBox cbOwnCloudAutoExpire;
private System.Windows.Forms.NumericUpDown txtOwnCloudExpiryTime;
>>>>>>>
private System.Windows.Forms.Label lblOwnCloudExpiryTime;
private System.Windows.Forms.CheckBox cbOwnCloudAutoExpire;
private System.Windows.Forms.NumericUpDown txtOwnCloudExpiryTime;
internal System.Windows.Forms.TabPage tpBackblazeB2;
private System.Windows.Forms.TextBox txtB2CustomUrl;
private System.Windows.Forms.Label lblB2UrlPreview;
private System.Windows.Forms.CheckBox cbB2CustomUrl;
private System.Windows.Forms.Label lblB2Bucket;
private System.Windows.Forms.TextBox txtB2Bucket;
private System.Windows.Forms.TextBox txtB2UploadPath;
private System.Windows.Forms.Label lblB2UploadPath;
private System.Windows.Forms.TextBox txtB2ApplicationKey;
private System.Windows.Forms.Label lblB2ApplicationKey;
private System.Windows.Forms.Label lblB2ApplicationKeyId;
private System.Windows.Forms.TextBox txtB2ApplicationKeyId;
private System.Windows.Forms.TextBox txtB2UrlPreview;
private System.Windows.Forms.LinkLabel lblB2ManageLink; |
<<<<<<<
using System.Runtime.InteropServices;
=======
using System.Linq;
>>>>>>>
using System.Runtime.InteropServices;
using System.Linq; |
<<<<<<<
this.Headers.Add("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36");
=======
this.Headers.Add("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36");
>>>>>>>
this.Headers.Add("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36");
<<<<<<<
this.Encoding = Encoding.UTF8;
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
=======
>>>>>>> |
<<<<<<<
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
=======
using System.Threading;
>>>>>>>
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Threading;
<<<<<<<
this.comboBox1.SelectedIndex = Properties.Settings.Default.loginMethod;
=======
this.loginMethodInput.SelectedIndex = Properties.Settings.Default.loginMethod;
this.comboBox2.SelectedIndex = Properties.Settings.Default.loginGame;
>>>>>>>
this.comboBox1.SelectedIndex = Properties.Settings.Default.loginMethod; |
<<<<<<<
public bool ES3Compatible = false;
=======
public bool IncludeRefs = false;
>>>>>>>
public bool ES3Compatible = false;
public bool IncludeRefs = false;
<<<<<<<
case "--help":
case "-help":
case "-?":
config.ShowHelp = true;
break;
case "--es3":
case "-es3":
config.ES3Compatible = true;
break;
default:
config.MainAssembly = a;
break;
=======
case "--includerefs":
case "-r":
config.IncludeRefs = true;
break;
case "--help":
case "-h":
case "-?":
case "/?":
config.ShowHelp = true;
break;
default:
if (!a.StartsWith ("-")) {
config.AssembliesToDecompile.Add (a);
}
break;
>>>>>>>
case "--includerefs":
case "-r":
config.IncludeRefs = true;
break;
case "--help":
case "-h":
case "-?":
case "/?":
config.ShowHelp = true;
break;
case "--es3":
case "-es3":
config.ES3Compatible = true;
break;
default:
if (!a.StartsWith ("-")) {
config.AssembliesToDecompile.Add (a);
}
break; |
<<<<<<<
using System;
using DFe.DocumentosEletronicos.Common;
=======
using System;
using CTe.CTeOSDocumento.Common;
>>>>>>>
using System;
using CTe.CTeOSDocumento.Common; |
<<<<<<<
var ctor = selector.SelectFor(typeof(WithDefaultAndSingleParameter), new Type[0], DefaultBindingFlags);
Assert.AreEqual(1, ctor.GetParameters().Length);
=======
var ctor = ConstructorSelector.SelectFor(typeof(WithDefaultAndSingleParameter), new Type[0], DefaultBindingFlags);
Assert.Single(ctor.GetParameters());
>>>>>>>
var ctor = ConstructorSelector.SelectFor(typeof(WithDefaultAndSingleParameter), new Type[0], DefaultBindingFlags);
Assert.AreEqual(1, ctor.GetParameters().Length);
<<<<<<<
var ctor = selector.SelectFor(typeof(With3Parameters), new Type[0], DefaultBindingFlags);
Assert.AreEqual(2, ctor.GetParameters().Length);
=======
var ctor = ConstructorSelector.SelectFor(typeof(With3Parameters), new Type[0], DefaultBindingFlags);
Assert.Equal(2, ctor.GetParameters().Length);
>>>>>>>
var ctor = ConstructorSelector.SelectFor(typeof(With3Parameters), new Type[0], DefaultBindingFlags);
Assert.AreEqual(2, ctor.GetParameters().Length);
<<<<<<<
var ctor = selector.SelectFor(typeof(WithArrayParameter), new Type[0], DefaultBindingFlags);
Assert.AreEqual(1, ctor.GetParameters().Length);
=======
var ctor = ConstructorSelector.SelectFor(typeof(WithArrayParameter), new Type[0], DefaultBindingFlags);
Assert.Single(ctor.GetParameters());
>>>>>>>
var ctor = ConstructorSelector.SelectFor(typeof(WithArrayParameter), new Type[0], DefaultBindingFlags);
Assert.AreEqual(1, ctor.GetParameters().Length);
<<<<<<<
var ctor = selector.SelectFor(typeof(WithSealedParameter), new Type[0], DefaultBindingFlags);
Assert.AreEqual(0, ctor.GetParameters().Length);
=======
var ctor = ConstructorSelector.SelectFor(typeof(WithSealedParameter), new Type[0], DefaultBindingFlags);
Assert.Empty(ctor.GetParameters());
>>>>>>>
var ctor = ConstructorSelector.SelectFor(typeof(WithSealedParameter), new Type[0], DefaultBindingFlags);
Assert.AreEqual(0, ctor.GetParameters().Length);
<<<<<<<
var ctor = selector.SelectFor(typeof(WithSealedParameter), new Type[] { typeof(string) }, DefaultBindingFlags);
Assert.AreEqual(1, ctor.GetParameters().Length);
=======
var ctor = ConstructorSelector.SelectFor(typeof(WithSealedParameter), new Type[] { typeof(string) }, DefaultBindingFlags);
Assert.Single(ctor.GetParameters());
>>>>>>>
var ctor = ConstructorSelector.SelectFor(typeof(WithSealedParameter), new Type[] { typeof(string) }, DefaultBindingFlags);
Assert.AreEqual(1, ctor.GetParameters().Length);
<<<<<<<
var ctor = selector.SelectFor(typeof(WithPrivateConstructor), new Type[0], privateBindingFlags);
Assert.AreEqual(2, ctor.GetParameters().Length);
=======
var ctor = ConstructorSelector.SelectFor(typeof(WithPrivateConstructor), new Type[0], privateBindingFlags);
Assert.Equal(2, ctor.GetParameters().Length);
>>>>>>>
var ctor = ConstructorSelector.SelectFor(typeof(WithPrivateConstructor), new Type[0], privateBindingFlags);
Assert.AreEqual(2, ctor.GetParameters().Length); |
<<<<<<<
var listed = v["catalogEntry"]?["listed"] ?? true;
if (!(bool)listed) continue;
=======
DateTime? time = null;
var times = v["catalogEntry"]?["published"];
if (times != null) {
time = (DateTime)times;
}
>>>>>>>
var listed = v["catalogEntry"]?["listed"] ?? true;
if (!(bool)listed) continue;
DateTime? time = null;
var times = v["catalogEntry"]?["published"];
if (times != null) {
time = (DateTime)times;
} |
<<<<<<<
var serverUrl = settings.ServerUrl;
Trace.Info("ServerUrl: {0}", serverUrl);
Uri uri = new Uri(serverUrl);
VssConnection conn = ApiUtil.CreateConnection(uri, creds);
Trace.Info("Set credentials on task service");
var taskSvr = HostContext.GetService<ITaskServer>();
taskSvr.SetConnection(conn);
var term = HostContext.GetService<ITerminal>();
=======
>>>>>>> |
<<<<<<<
this.glControlMotor = new OpenTK.GLControl();
=======
this.buttonCouplerObject = new System.Windows.Forms.Button();
>>>>>>>
this.buttonCouplerObject = new System.Windows.Forms.Button();
this.glControlMotor = new OpenTK.GLControl();
<<<<<<<
this.toolStripContainerDrawArea.ContentPanel.Controls.Add(this.glControlMotor);
this.toolStripContainerDrawArea.ContentPanel.Size = new System.Drawing.Size(568, 593);
=======
this.toolStripContainerDrawArea.ContentPanel.Controls.Add(this.pictureBoxDrawArea);
this.toolStripContainerDrawArea.ContentPanel.Size = new System.Drawing.Size(568, 648);
>>>>>>>
this.toolStripContainerDrawArea.ContentPanel.Controls.Add(this.glControlMotor);
this.toolStripContainerDrawArea.ContentPanel.Size = new System.Drawing.Size(568, 593);
<<<<<<<
=======
// pictureBoxDrawArea
//
this.pictureBoxDrawArea.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBoxDrawArea.Location = new System.Drawing.Point(0, 0);
this.pictureBoxDrawArea.Name = "pictureBoxDrawArea";
this.pictureBoxDrawArea.Size = new System.Drawing.Size(568, 648);
this.pictureBoxDrawArea.TabIndex = 2;
this.pictureBoxDrawArea.TabStop = false;
this.pictureBoxDrawArea.MouseDown += new System.Windows.Forms.MouseEventHandler(this.PictureBoxDrawArea_MouseDown);
this.pictureBoxDrawArea.MouseEnter += new System.EventHandler(this.PictureBoxDrawArea_MouseEnter);
this.pictureBoxDrawArea.MouseMove += new System.Windows.Forms.MouseEventHandler(this.PictureBoxDrawArea_MouseMove);
this.pictureBoxDrawArea.MouseUp += new System.Windows.Forms.MouseEventHandler(this.PictureBoxDrawArea_MouseUp);
//
>>>>>>>
<<<<<<<
// glControlMotor
//
this.glControlMotor.BackColor = System.Drawing.Color.Black;
this.glControlMotor.Dock = System.Windows.Forms.DockStyle.Fill;
this.glControlMotor.Location = new System.Drawing.Point(0, 0);
this.glControlMotor.Name = "glControlMotor";
this.glControlMotor.Size = new System.Drawing.Size(568, 593);
this.glControlMotor.TabIndex = 0;
this.glControlMotor.VSync = false;
this.glControlMotor.Paint += new System.Windows.Forms.PaintEventHandler(this.GlControlMotor_Paint);
this.glControlMotor.KeyDown += new System.Windows.Forms.KeyEventHandler(this.GlControlMotor_KeyDown);
this.glControlMotor.MouseDown += new System.Windows.Forms.MouseEventHandler(this.GlControlMotor_MouseDown);
this.glControlMotor.MouseEnter += new System.EventHandler(this.GlControlMotor_MouseEnter);
this.glControlMotor.MouseMove += new System.Windows.Forms.MouseEventHandler(this.GlControlMotor_MouseMove);
this.glControlMotor.MouseUp += new System.Windows.Forms.MouseEventHandler(this.GlControlMotor_MouseUp);
this.glControlMotor.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.GlControlMotor_PreviewKeyDown);
//
=======
// buttonCouplerObject
//
this.buttonCouplerObject.Location = new System.Drawing.Point(134, 95);
this.buttonCouplerObject.Name = "buttonCouplerObject";
this.buttonCouplerObject.Size = new System.Drawing.Size(56, 21);
this.buttonCouplerObject.TabIndex = 30;
this.buttonCouplerObject.Text = "Open...";
this.buttonCouplerObject.UseVisualStyleBackColor = true;
this.buttonCouplerObject.Click += new System.EventHandler(this.buttonCouplerObject_Click);
//
>>>>>>>
// glControlMotor
//
this.glControlMotor.BackColor = System.Drawing.Color.Black;
this.glControlMotor.Dock = System.Windows.Forms.DockStyle.Fill;
this.glControlMotor.Location = new System.Drawing.Point(0, 0);
this.glControlMotor.Name = "glControlMotor";
this.glControlMotor.Size = new System.Drawing.Size(568, 593);
this.glControlMotor.TabIndex = 0;
this.glControlMotor.VSync = false;
this.glControlMotor.Paint += new System.Windows.Forms.PaintEventHandler(this.GlControlMotor_Paint);
this.glControlMotor.KeyDown += new System.Windows.Forms.KeyEventHandler(this.GlControlMotor_KeyDown);
this.glControlMotor.MouseDown += new System.Windows.Forms.MouseEventHandler(this.GlControlMotor_MouseDown);
this.glControlMotor.MouseEnter += new System.EventHandler(this.GlControlMotor_MouseEnter);
this.glControlMotor.MouseMove += new System.Windows.Forms.MouseEventHandler(this.GlControlMotor_MouseMove);
this.glControlMotor.MouseUp += new System.Windows.Forms.MouseEventHandler(this.GlControlMotor_MouseUp);
this.glControlMotor.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.GlControlMotor_PreviewKeyDown);
//
// buttonCouplerObject
//
this.buttonCouplerObject.Location = new System.Drawing.Point(134, 95);
this.buttonCouplerObject.Name = "buttonCouplerObject";
this.buttonCouplerObject.Size = new System.Drawing.Size(56, 21);
this.buttonCouplerObject.TabIndex = 30;
this.buttonCouplerObject.Text = "Open...";
this.buttonCouplerObject.UseVisualStyleBackColor = true;
this.buttonCouplerObject.Click += new System.EventHandler(this.buttonCouplerObject_Click);
//
<<<<<<<
private OpenTK.GLControl glControlMotor;
=======
private TextBox textBoxCouplerObject;
private Label labelCouplerObject;
private Button buttonCouplerObject;
>>>>>>>
private TextBox textBoxCouplerObject;
private Label labelCouplerObject;
private Button buttonCouplerObject;
private OpenTK.GLControl glControlMotor; |
<<<<<<<
/// <summary>
/// Dictionary of StaticObject with Path and PreserveVertices as keys.
/// </summary>
public readonly Dictionary<ValueTuple<string, bool>, StaticObject> StaticObjectCache;
/// <summary>
/// Dictionary of AnimatedObjectCollection with Path as key.
/// </summary>
public readonly Dictionary<string, AnimatedObjectCollection> AnimatedObjectCollectionCache;
=======
/// <summary>Adds a marker texture to the host application's display</summary>
/// <param name="MarkerTexture">The texture to add</param>
public virtual void AddMarker(Texture MarkerTexture)
{
}
/// <summary>Removes a marker texture if present in the host application's display</summary>
/// <param name="MarkerTexture">The texture to remove</param>
public virtual void RemoveMarker(Texture MarkerTexture)
{
}
/// <summary>Called when a follower reaches the end of the world</summary>
public virtual void CameraAtWorldEnd()
{
}
>>>>>>>
/// <summary>
/// Dictionary of StaticObject with Path and PreserveVertices as keys.
/// </summary>
public readonly Dictionary<ValueTuple<string, bool>, StaticObject> StaticObjectCache;
/// <summary>
/// Dictionary of AnimatedObjectCollection with Path as key.
/// </summary>
public readonly Dictionary<string, AnimatedObjectCollection> AnimatedObjectCollectionCache;
/// <summary>Adds a marker texture to the host application's display</summary>
/// <param name="MarkerTexture">The texture to add</param>
public virtual void AddMarker(Texture MarkerTexture)
{
}
/// <summary>Removes a marker texture if present in the host application's display</summary>
/// <param name="MarkerTexture">The texture to remove</param>
public virtual void RemoveMarker(Texture MarkerTexture)
{
}
/// <summary>Called when a follower reaches the end of the world</summary>
public virtual void CameraAtWorldEnd()
{
} |
<<<<<<<
TrackManager.UpdateTrackFollower(ref World.CameraTrackFollower, -1.0, true, false);
TrackManager.UpdateTrackFollower(ref World.CameraTrackFollower, FirstStationPosition, true, false);
Camera.Alignment = new CameraAlignment(new Vector3(0.0, 2.5, 0.0), 0.0, 0.0, 0.0, FirstStationPosition, 1.0);
=======
World.CameraTrackFollower.UpdateAbsolute(-1.0, true, false);
World.CameraTrackFollower.UpdateAbsolute(FirstStationPosition, true, false);
Camera.CurrentAlignment = new CameraAlignment(new Vector3(0.0, 2.5, 0.0), 0.0, 0.0, 0.0, FirstStationPosition, 1.0);
>>>>>>>
World.CameraTrackFollower.UpdateAbsolute(-1.0, true, false);
World.CameraTrackFollower.UpdateAbsolute(FirstStationPosition, true, false);
Camera.Alignment = new CameraAlignment(new Vector3(0.0, 2.5, 0.0), 0.0, 0.0, 0.0, FirstStationPosition, 1.0); |
<<<<<<<
World.CameraTrackFollower.Update(World.CameraTrackFollower.TrackPosition + z, true, false);
Camera.Alignment.TrackPosition = World.CameraTrackFollower.TrackPosition;
=======
World.CameraTrackFollower.UpdateRelative(z, true, false);
Camera.CurrentAlignment.TrackPosition = World.CameraTrackFollower.TrackPosition;
>>>>>>>
World.CameraTrackFollower.UpdateRelative(z, true, false);
Camera.Alignment.TrackPosition = World.CameraTrackFollower.TrackPosition;
<<<<<<<
World.CameraTrackFollower.Update(World.CameraTrackFollower.TrackPosition + z, true, false);
Camera.Alignment.TrackPosition =
=======
World.CameraTrackFollower.UpdateRelative(z, true, false);
Camera.CurrentAlignment.TrackPosition =
>>>>>>>
World.CameraTrackFollower.UpdateRelative(z, true, false);
Camera.Alignment.TrackPosition = |
<<<<<<<
World.CameraTrackFollower.Update(-1.0, true, false);
ObjectManager.UpdateVisibility(World.CameraTrackFollower.TrackPosition + Camera.Alignment.Position.Z);
=======
World.CameraTrackFollower.UpdateAbsolute(-1.0, true, false);
ObjectManager.UpdateVisibility(World.CameraTrackFollower.TrackPosition + Camera.CurrentAlignment.Position.Z);
>>>>>>>
World.CameraTrackFollower.UpdateAbsolute(-1.0, true, false);
ObjectManager.UpdateVisibility(World.CameraTrackFollower.TrackPosition + Camera.Alignment.Position.Z); |
<<<<<<<
using static LibRender.CameraProperties;
=======
using LibRender;
using OpenBve.RouteManager;
>>>>>>>
using static LibRender.CameraProperties;
using OpenBve.RouteManager; |
<<<<<<<
using tso.world.components;
=======
>>>>>>>
using tso.world.components; |
<<<<<<<
var switchedProjects = SwitchToPackage(mapping.Value, solution, packageName, host);
=======
var switchedProjects = SwitchToPackage(solution, projectPath, packageName, packageVersion, mappedProjectFilePaths, host);
>>>>>>>
var switchedProjects = SwitchToPackage(mapping.Value, solution, projectPath, packageName, packageVersion, mappedProjectFilePaths, host);
<<<<<<<
switchedProjects.Add(solutionProject.AbsolutePath);
count++;
=======
if (count > 0)
{
project.Save();
}
>>>>>>>
switchedProjects.Add(solutionProject.AbsolutePath);
count++;
}
}
if (count > 0)
{
project.Save(); |
<<<<<<<
public class Payment
{
/// <summary>
/// Identifier of the payment resource created.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string id { get; set; }
/// <summary>
/// Time the resource was created.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string create_time { get; set; }
/// <summary>
/// Time the resource was last updated.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string update_time { get; set; }
/// <summary>
/// Intent of the payment - Sale or Authorization or Order.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string intent { get; set; }
/// <summary>
/// Source of the funds for this payment represented by a PayPal account or a direct credit card.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public Payer payer { get; set; }
/// <summary>
/// A payment can have more than one transaction, with each transaction establishing a contract between the payer and a payee
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<Transaction> transactions { get; set; }
/// <summary>
/// state of the payment
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string state { get; set; }
/// <summary>
/// Redirect urls required only when using payment_method as PayPal - the only settings supported are return and cancel urls.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public RedirectUrls redirect_urls { get; set; }
/// <summary>
///
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<Links> links { get; set; }
/// <summary>
/// Identifier for the payment experience.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string experience_profile_id { get; set; }
/// <summary>
/// Creates (and processes) a new Payment Resource.
/// </summary>
/// <param name="accessToken">Access Token used for the API call.</param>
/// <returns>Payment</returns>
public Payment Create(string accessToken)
{
APIContext apiContext = new APIContext(accessToken);
return Create(apiContext);
}
/// <summary>
/// Creates (and processes) a new Payment Resource.
/// </summary>
/// <param name="apiContext">APIContext used for the API call.</param>
/// <returns>Payment</returns>
public Payment Create(APIContext apiContext)
{
=======
public class Payment
{
/// <summary>
/// Identifier of the payment resource created.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string id { get; set; }
/// <summary>
/// Time the resource was created in UTC ISO8601 format.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string create_time { get; set; }
/// <summary>
/// Time the resource was last updated in UTC ISO8601 format.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string update_time { get; set; }
/// <summary>
/// Intent of the payment - Sale or Authorization or Order.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string intent { get; set; }
/// <summary>
/// Source of the funds for this payment represented by a PayPal account or a direct credit card.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public Payer payer { get; set; }
/// <summary>
/// Cart for which the payment is done.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string cart { get; set; }
/// <summary>
/// A payment can have more than one transaction, with each transaction establishing a contract between the payer and a payee
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<Transaction> transactions { get; set; }
/// <summary>
/// state of the payment
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string state { get; set; }
/// <summary>
/// Redirect urls required only when using payment_method as PayPal - the only settings supported are return and cancel urls.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public RedirectUrls redirect_urls { get; set; }
/// <summary>
///
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<Links> links { get; set; }
/// <summary>
/// Creates (and processes) a new Payment Resource.
/// </summary>
/// <param name="accessToken">Access Token used for the API call.</param>
/// <returns>Payment</returns>
public Payment Create(string accessToken)
{
APIContext apiContext = new APIContext(accessToken);
return Create(apiContext);
}
/// <summary>
/// Creates (and processes) a new Payment Resource.
/// </summary>
/// <param name="apiContext">APIContext used for the API call.</param>
/// <returns>Payment</returns>
public Payment Create(APIContext apiContext)
{
>>>>>>>
public class Payment
{
/// <summary>
/// Identifier of the payment resource created.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string id { get; set; }
/// <summary>
/// Time the resource was created in UTC ISO8601 format.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string create_time { get; set; }
/// <summary>
/// Time the resource was last updated in UTC ISO8601 format.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string update_time { get; set; }
/// <summary>
/// Intent of the payment - Sale or Authorization or Order.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string intent { get; set; }
/// <summary>
/// Source of the funds for this payment represented by a PayPal account or a direct credit card.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public Payer payer { get; set; }
/// <summary>
/// Cart for which the payment is done.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string cart { get; set; }
/// <summary>
/// A payment can have more than one transaction, with each transaction establishing a contract between the payer and a payee
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<Transaction> transactions { get; set; }
/// <summary>
/// state of the payment
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string state { get; set; }
/// <summary>
/// Redirect urls required only when using payment_method as PayPal - the only settings supported are return and cancel urls.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public RedirectUrls redirect_urls { get; set; }
/// <summary>
///
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<Links> links { get; set; }
/// <summary>
/// Identifier for the payment experience.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string experience_profile_id { get; set; }
/// <summary>
/// Creates (and processes) a new Payment Resource.
/// </summary>
/// <param name="accessToken">Access Token used for the API call.</param>
/// <returns>Payment</returns>
public Payment Create(string accessToken)
{
APIContext apiContext = new APIContext(accessToken);
return Create(apiContext);
}
/// <summary>
/// Creates (and processes) a new Payment Resource.
/// </summary>
/// <param name="apiContext">APIContext used for the API call.</param>
/// <returns>Payment</returns>
public Payment Create(APIContext apiContext)
{ |
<<<<<<<
var moduleId = new ModuleIdentity("hub", "deviceId", "moduleid", Mock.Of<ICredentials>());
var docker = new DockerModule(moduleId.ModuleId, "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultPriority, DefaultConfigurationInfo, EnvVars);
=======
var moduleId = new ModuleIdentity("hub", "gateway", "deviceId", "moduleid", Mock.Of<ICredentials>());
var docker = new DockerModule(moduleId.ModuleId, "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVars);
>>>>>>>
var moduleId = new ModuleIdentity("hub", "deviceId", "moduleid", Mock.Of<ICredentials>());
var docker = new DockerModule(moduleId.ModuleId, "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVars);
<<<<<<<
var moduleId = new ModuleIdentity("hub", "deviceId", "moduleid", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultPriority, DefaultConfigurationInfo, EnvVars);
=======
var moduleId = new ModuleIdentity("hub", "gateway", "deviceId", "moduleid", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVars);
>>>>>>>
var moduleId = new ModuleIdentity("hub", "deviceId", "moduleid", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVars);
<<<<<<<
var moduleId = new ModuleIdentity("hostname", "deviceid", "moduleid", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultPriority, DefaultConfigurationInfo, EnvVars);
=======
var moduleId = new ModuleIdentity("hostname", "gatewayhost", "deviceid", "moduleid", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVars);
>>>>>>>
var moduleId = new ModuleIdentity("hostname", "deviceid", "moduleid", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVars);
<<<<<<<
var moduleId = new ModuleIdentity("hostname", "deviceid", "moduleid", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultPriority, DefaultConfigurationInfo, EnvVars);
=======
var moduleId = new ModuleIdentity("hostname", "gatewayhost", "deviceid", "moduleid", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVars);
>>>>>>>
var moduleId = new ModuleIdentity("hostname", "deviceid", "moduleid", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVars); |
<<<<<<<
var identity = new ModuleIdentity("hostname", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultPriority, DefaultConfigurationInfo, EnvVarsDict);
=======
var identity = new ModuleIdentity("hostname", "gatewayhost", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVarsDict);
>>>>>>>
var identity = new ModuleIdentity("hostname", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVarsDict);
<<<<<<<
var identity = new ModuleIdentity("hostname", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultPriority, DefaultConfigurationInfo, EnvVarsDict);
=======
var identity = new ModuleIdentity("hostname", "gatewayhost", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVarsDict);
>>>>>>>
var identity = new ModuleIdentity("hostname", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVarsDict);
<<<<<<<
var identity = new ModuleIdentity("hostname", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultPriority, DefaultConfigurationInfo, EnvVarsDict);
=======
var identity = new ModuleIdentity("hostname", "gatewayhost", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVarsDict);
>>>>>>>
var identity = new ModuleIdentity("hostname", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVarsDict);
<<<<<<<
var identity = new ModuleIdentity("hostname", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultPriority, DefaultConfigurationInfo, EnvVarsDict);
=======
var identity = new ModuleIdentity("hostname", "gatewayhost", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVarsDict);
>>>>>>>
var identity = new ModuleIdentity("hostname", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVarsDict);
<<<<<<<
var identity = new ModuleIdentity("hostname", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultPriority, DefaultConfigurationInfo, EnvVarsDict);
=======
var identity = new ModuleIdentity("hostname", "gatewayhost", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVarsDict);
>>>>>>>
var identity = new ModuleIdentity("hostname", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVarsDict);
<<<<<<<
var identity = new ModuleIdentity("hostname", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultPriority, DefaultConfigurationInfo, EnvVarsDict);
=======
var identity = new ModuleIdentity("hostname", "gatewayhost", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVarsDict);
>>>>>>>
var identity = new ModuleIdentity("hostname", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVarsDict);
<<<<<<<
var identity = new ModuleIdentity("hostname", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultPriority, DefaultConfigurationInfo, EnvVarsDict);
=======
var identity = new ModuleIdentity("hostname", "gatewayhost", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVarsDict);
>>>>>>>
var identity = new ModuleIdentity("hostname", "deviceid", "Module1", Mock.Of<ICredentials>());
var docker = new DockerModule("module1", "v1", ModuleStatus.Running, RestartPolicy.Always, Config1, ImagePullPolicy.OnCreate, Constants.DefaultStartupOrder, DefaultConfigurationInfo, EnvVarsDict); |
<<<<<<<
=======
const string ApiVersionKey = "api-version";
const string DeviceClientTypeKey = "DeviceClientType";
const string ModelIdKey = "digital-twin-model-id";
>>>>>>>
const string ModelIdKey = "digital-twin-model-id";
<<<<<<<
ClientInfo clientInfo = this.usernameParser.Parse(username);
=======
(string deviceId, string moduleId, string deviceClientType, Option<string> modelId) = ParseUserName(username);
>>>>>>>
ClientInfo clientInfo = this.usernameParser.Parse(username);
<<<<<<<
=======
internal static (string deviceId, string moduleId, string deviceClientType, Option<string> modelId) ParseUserName(string username)
{
// Username is of one of the 2 forms:
// username = edgeHubHostName "/" deviceId [ "/" moduleId ] "/?" properties
// Note, the ? should be the first character of the last segment (as it is a valid character for a deviceId/moduleId)
// OR
// username = edgeHubHostName "/" deviceId [ "/" moduleId ] "/" properties
// properties = property *("&" property)
// property = name "=" value
// We recognize three property names:
// "api-version" [mandatory]
// "DeviceClientType" [optional]
// "digital-twin-model-id" [optional]
// We ignore any properties we don't recognize.
// Note - this logic does not check the query parameters for special characters, and '?' is treated as a valid value
// and not used as a separator, unless it is the first character of the last segment
// (since the property bag is not url encoded). So the following are valid username inputs -
// "iotHub1/device1/module1/foo?bar=b1&api-version=2010-01-01&DeviceClientType=customDeviceClient1"
// "iotHub1/device1?&api-version=2010-01-01&DeviceClientType=customDeviceClient1"
// "iotHub1/device1/module1?&api-version=2010-01-01&DeviceClientType=customDeviceClient1"
string deviceId;
string moduleId = string.Empty;
IDictionary<string, string> queryParameters;
string[] usernameSegments = Preconditions.CheckNonWhiteSpace(username, nameof(username)).Split('/');
if (usernameSegments[usernameSegments.Length - 1].StartsWith("?", StringComparison.OrdinalIgnoreCase))
{
// edgeHubHostName/device1/?apiVersion=10-2-3&DeviceClientType=foo
if (usernameSegments.Length == 3)
{
deviceId = usernameSegments[1].Trim();
queryParameters = ParseDeviceClientType(usernameSegments[2].Substring(1).Trim());
}
else if (usernameSegments.Length == 4)
{
// edgeHubHostName/device1/module1/?apiVersion=10-2-3&DeviceClientType=foo
deviceId = usernameSegments[1].Trim();
moduleId = usernameSegments[2].Trim();
queryParameters = ParseDeviceClientType(usernameSegments[3].Substring(1).Trim());
}
else
{
throw new EdgeHubConnectionException($"Username {username} does not contain valid values");
}
}
else
{
// edgeHubHostName/device1/apiVersion=10-2-3&DeviceClientType=foo
if (usernameSegments.Length == 3 && usernameSegments[2].Contains("api-version="))
{
deviceId = usernameSegments[1].Trim();
queryParameters = ParseDeviceClientType(usernameSegments[2].Trim());
}
else if (usernameSegments.Length == 4 && usernameSegments[3].Contains("api-version="))
{
// edgeHubHostName/device1/module1/apiVersion=10-2-3&DeviceClientType=foo
deviceId = usernameSegments[1].Trim();
moduleId = usernameSegments[2].Trim();
queryParameters = ParseDeviceClientType(usernameSegments[3].Trim());
}
else if (usernameSegments.Length == 6 && username.EndsWith("/api-version=2017-06-30/DeviceClientType=Microsoft.Azure.Devices.Client/1.5.1-preview-003", StringComparison.OrdinalIgnoreCase))
{
// The Azure ML container is using an older client that returns a device client with the following format -
// username = edgeHubHostName/deviceId/moduleId/api-version=2017-06-30/DeviceClientType=Microsoft.Azure.Devices.Client/1.5.1-preview-003
// Notice how the DeviceClientType parameter is separated by a '/' instead of a '&', giving a usernameSegments.Length of 6 instead of the expected 4
// To allow those clients to work, check for that specific api-version, and version.
deviceId = usernameSegments[1].Trim();
moduleId = usernameSegments[2].Trim();
queryParameters = new Dictionary<string, string>
{
[ApiVersionKey] = "2017-06-30",
[DeviceClientTypeKey] = "Microsoft.Azure.Devices.Client/1.5.1-preview-003"
};
}
else
{
throw new EdgeHubConnectionException($"Username {username} does not contain valid values");
}
}
// Check if the api-version parameter exists, but don't check its value.
if (!queryParameters.TryGetValue(ApiVersionKey, out string apiVersionKey) || string.IsNullOrWhiteSpace(apiVersionKey))
{
throw new EdgeHubConnectionException($"Username {username} does not contain a valid Api-version property");
}
if (string.IsNullOrWhiteSpace(deviceId))
{
throw new EdgeHubConnectionException($"Username {username} does not contain a valid device ID");
}
if (!queryParameters.TryGetValue(DeviceClientTypeKey, out string deviceClientType))
{
deviceClientType = string.Empty;
}
Option<string> modelIdOption = Option.None<string>();
if (queryParameters.TryGetValue(ModelIdKey, out string modelId) && !string.IsNullOrWhiteSpace(modelId))
{
modelIdOption = Option.Some(modelId);
}
return (deviceId, moduleId, deviceClientType, modelIdOption);
}
static IDictionary<string, string> ParseDeviceClientType(string queryParameterString)
{
// example input: "api-version=version&DeviceClientType=url-escaped-string&other-prop=value&some-other-prop"
var kvsep = new[] { '=' };
Dictionary<string, string> queryParameters = queryParameterString
.Split('&') // split input string into params
.Select(s => s.Split(kvsep, 2)) // split each param into a key/value pair
.GroupBy(s => s[0]) // group duplicates (by key) together...
.Select(s => s.First()) // ...and keep only the first one
.ToDictionary(
s => s[0],
s => Uri.UnescapeDataString(s.ElementAtOrEmpty(1))); // convert to Dictionary<string, string>
return queryParameters;
}
>>>>>>> |
<<<<<<<
["Boost"] = "kh2-icon-tent",
["Form"] = "kh2-item-key",
["Map"] = "kh2-item-key",
["Report"] = "kh2-item-key",
["Summon"] = "kh2-item-key",
["Recipe"] = "KupoCoinIcon",
=======
["Card"] = "card-generic",
["CardEnemy"] = "card-enemy",
["CardFriend"] = "card-friend",
["CardItem"] = "card-item",
["CardMagic"] = "card-magic",
["CardMap"] = "card-world",
["CardMapRed"] = "card-world",
["CardMapGreen"] = "card-world",
["CardMapBlue"] = "card-world",
["CardMapSpecial"] = "card-world",
["CardSpecial"] = "card-kingdom",
["CardSummon"] = "card-magic",
["CardWeapon"] = "card-weapon",
["CardWorld"] = "card-world",
>>>>>>>
["Boost"] = "kh2-icon-tent",
["Form"] = "kh2-item-key",
["Map"] = "kh2-item-key",
["Report"] = "kh2-item-key",
["Summon"] = "kh2-item-key",
["Recipe"] = "KupoCoinIcon",
["Card"] = "card-generic",
["CardEnemy"] = "card-enemy",
["CardFriend"] = "card-friend",
["CardItem"] = "card-item",
["CardMagic"] = "card-magic",
["CardMap"] = "card-world",
["CardMapRed"] = "card-world",
["CardMapGreen"] = "card-world",
["CardMapBlue"] = "card-world",
["CardMapSpecial"] = "card-world",
["CardSpecial"] = "card-kingdom",
["CardSummon"] = "card-magic",
["CardWeapon"] = "card-weapon",
["CardWorld"] = "card-world", |
<<<<<<<
using KHSave.LibBbs;
=======
using KHSave.SaveEditor.Views;
>>>>>>>
using KHSave.LibBbs;
using KHSave.SaveEditor.Views; |
<<<<<<<
#region Component locator methods
public T GetComponent<T>() where T : Component
{
return gameObject.GetComponent<T>();
}
public Component GetComponent(Type type)
=======
public Component[] GetComponentsInChildren(Type type)
>>>>>>>
#region Component locator methods
public T GetComponent<T>() where T : Component
{
return gameObject.GetComponent<T>();
}
public T[] GetComponents<T>() where T : Component
{
return gameObject.GetComponents<T>();
}
public Component[] GetComponentsInChildren(Type type)
<<<<<<<
public T[] GetComponents<T>() where T : Component
{
return gameObject.GetComponents<T>();
}
public Component[] GetComponents(Type type)
{
return GetComponents(type);
}
public Component[] GetComponentsInChildren(Type type)
{
return gameObject.GetComponentsInChildren(type);
}
public Component GetComponentInChildren(Type type)
{
return gameObject.GetComponentInChildren(type);
}
public T[] GetComponentsInParents<T>() where T : Component
{
return GetComponentsInParents<T>();
}
#endregion
public void Rotate(Vector3 eulerAngles, Space relativeTo)
{
throw new NotImplementedException("Transform.Translate is not implemented yet");
}
#region Translate methods
// TODO implement Translate function
public void Translate(Vector3 translation, Space relativeTo)
{
throw new NotImplementedException("Transform.Translate is not implemented yet");
}
#endregion
=======
public Component[] GetComponentsInChildren(Type type, bool includeInactive)
{
// TODO: Objects should be destroyed after Update but before Rendering
throw new NotImplementedException("Method not implemented.");
}
#endregion
#region Overridden methods
public override string ToString()
{
if (gameObject == null)
{
return GetType().Name + " on its own";
}
return GetType().Name + " on " + gameObject.name + " (" + gameObject.GetInstanceID() + ")";
}
#endregion
>>>>>>>
public T[] GetComponentsInParents<T>() where T : Component
{
return GetComponentsInParents<T>();
}
#endregion
public void Rotate(Vector3 eulerAngles, Space relativeTo)
{
throw new NotImplementedException("Transform.Translate is not implemented yet");
}
#region Translate methods
// TODO implement Translate function
public void Translate(Vector3 translation, Space relativeTo)
{
throw new NotImplementedException("Transform.Translate is not implemented yet");
}
#endregion
public Component[] GetComponentsInChildren(Type type, bool includeInactive)
{
// TODO: Objects should be destroyed after Update but before Rendering
throw new NotImplementedException("Method not implemented.");
}
#endregion
#region Overridden methods
public override string ToString()
{
if (gameObject == null)
{
return GetType().Name + " on its own";
}
return GetType().Name + " on " + gameObject.name + " (" + gameObject.GetInstanceID() + ")";
}
#endregion |
<<<<<<<
if (NoteActive(i))
{
Notes[i].instance.Stop();
Notes[i].instance.Dispose();
}
=======
if (NoteActive(i))
Bass.BASS_ChannelStop(Notes[i].channel);
>>>>>>>
if (NoteActive(i))
{
Notes[i].instance.Stop();
Notes[i].instance.Dispose();
}
<<<<<<<
public SoundEffectInstance instance;
=======
public int channel;
public uint SoundID; //This is for killing specific sounds, see HITInterpreter.SeqGroupKill.
>>>>>>>
public SoundEffectInstance instance;
public uint SoundID; //This is for killing specific sounds, see HITInterpreter.SeqGroupKill. |
<<<<<<<
DrawOrder = 1;
isUpdateable.Add(typeof(iTween));
isLateUpdateable.Add(typeof(iTween));
isFixedUpdateable.Add(typeof(iTween));
=======
DrawOrder = 0;
>>>>>>>
DrawOrder = 0;
isUpdateable.Add(typeof(iTween));
isLateUpdateable.Add(typeof(iTween));
isFixedUpdateable.Add(typeof(iTween)); |
<<<<<<<
using tso.simantics.engine;
using tso.files.utils;
using tso.simantics.engine.scopes;
using tso.simantics.engine.utils;
using Microsoft.Xna.Framework;
=======
using TSO.Simantics.engine;
using TSO.Files.utils;
using TSO.Simantics.engine.scopes;
using TSO.Simantics.engine.utils;
>>>>>>>
using TSO.Simantics.engine;
using TSO.Files.utils;
using TSO.Simantics.engine.scopes;
using TSO.Simantics.engine.utils;
using Microsoft.Xna.Framework; |
<<<<<<<
public void SetColor(string name, Color color)
{
this.color = color;
}
=======
public void PrepareLoadContent()
{
ContentHelper.LoadTexture(mainTexture);
}
public void EndLoadContent()
{
if (texture == null)
{
texture = ContentHelper.GetTexture(mainTexture);
}
}
>>>>>>>
public void PrepareLoadContent()
{
ContentHelper.LoadTexture(mainTexture);
}
public void EndLoadContent()
{
if (texture == null)
{
texture = ContentHelper.GetTexture(mainTexture);
}
}
public void SetColor(string name, Color color)
{
this.color = color;
} |
<<<<<<<
#if DEBUG
if (Camera.logRenderCalls)
{
Debug.LogFormat("Particle: {0} on {1}. Count {2}", gameObject, cam.gameObject, particlesRendered);
}
#endif
vertexBuffer.SetData(vertices, 0, particlesRendered * 4);
=======
>>>>>>>
#if DEBUG
if (Camera.logRenderCalls)
{
Debug.LogFormat("Particle: {0} on {1}. Count {2}", gameObject, cam.gameObject, particlesRendered);
}
#endif |
<<<<<<<
public string material;
protected Body connectedBody;
protected Vector3 lastResizeScale;
=======
public string material { get; set; }
>>>>>>>
public string material; |
<<<<<<<
if ((sharedMesh.skinnedModel != null) && (sharedMesh.skinnedModel.SkinningData != null))
{
if (sharedMesh.skinnedModel.SkinningData.AnimationClips != null)
{
animation.Initialize(sharedMesh.skinnedModel.SkinningData);
}
}
=======
>>>>>>>
if ((sharedMesh.skinnedModel != null) && (sharedMesh.skinnedModel.SkinningData != null))
{
if (sharedMesh.skinnedModel.SkinningData.AnimationClips != null)
{
animation.Initialize(sharedMesh.skinnedModel.SkinningData);
}
} |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.