Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing XAML Framework ID. #449

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,5 @@ packages
# our output folder for build artifacts
build

Thumbs.db
Thumbs.db
/src/.vs/config/applicationhost.config
8 changes: 1 addition & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@ build_script:

- cmd: msbuild src\TestStack.White.sln "/p:Configuration=%CONFIGURATION%;Platform=%PLATFORM%"

- cmd: ECHO GitLink src\ -u https://github.com/TestStack/White -c %CONFIGURATION% -ignore WinformsTodo,WpfTodo,WpfTodo.UITests,Todo.Core,TestSilverlightApplication,TestSilverlightApplication.Web,WindowsFormsTestApplication,WinFormsTestApp.Old,WPFTestApp.Old,WpfTestApplication,TestStack.White.Reporting,TestStack.White.ScreenObjects,TestStack.White.ScreenObjects.UITests,TestStack.White.UITests,TestStack.White.UnitTests,TestStack.White.WebBrowser,TestStack.White.WebBrowser.UITests,TestStack.White.WebBrowser.UnitTests
- cmd: GitLink . -u https://github.com/TestStack/White -c %CONFIGURATION% -ignore WinformsTodo,WpfTodo,WpfTodo.UITests,Todo.Core,TestSilverlightApplication,TestSilverlightApplication.Web,WindowsFormsTestApplication,WinFormsTestApp.Old,WPFTestApp.Old,WpfTestApplication,TestStack.White.Reporting,TestStack.White.ScreenObjects,TestStack.White.ScreenObjects.UITests,TestStack.White.UITests,TestStack.White.UnitTests,TestStack.White.WebBrowser,TestStack.White.WebBrowser.UITests,TestStack.White.WebBrowser.UnitTests

- cmd: ECHO nuget pack nuget\TestStack.White.nuspec -version "%GitVersion_NuGetVersion%" -prop "configuration=%CONFIGURATION%"
- cmd: nuget pack nuget\TestStack.White.nuspec -version "%GitVersion_NuGetVersion%" -prop "configuration=%CONFIGURATION%"
- cmd: appveyor PushArtifact "TestStack.White.%GitVersion_NuGetVersion%.nupkg"

on_finish:
- ps: if (Test-Path -path c:\FailedTestsScreenshots) { Get-ChildItem c:\FailedTestsScreenshots\*.* | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }}

cache:
- src\packages -> **\packages.config # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified
- src\packages -> **\packages.config # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified
55 changes: 51 additions & 4 deletions src/Samples/Todo.Core/ITaskRepository.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,60 @@
using System.Collections.Generic;
using System.Threading.Tasks;

// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ITaskRepository.cs" company="TestStack">
// All rights reserved.
// </copyright>
// <summary>
// Defines the ITaskRepository type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace Todo.Core
{
using System.Collections.Generic;
using System.Threading.Tasks;

/// <summary>
/// The TaskRepository interface.
/// </summary>
public interface ITaskRepository
{
Task<IEnumerable<TodoItem>> GetAll();
/// <summary>
/// The add.
/// </summary>
/// <param name="todoItem">
/// The to-do item.
/// </param>
/// <returns>
/// The <see cref="Task" />.
/// </returns>
Task Add(TodoItem todoItem);

/// <summary>
/// The delete.
/// </summary>
/// <param name="id">
/// The id.
/// </param>
/// <returns>
/// The <see cref="Task" />.
/// </returns>
Task Delete(int id);

/// <summary>
/// The get.
/// </summary>
/// <param name="id">
/// The id.
/// </param>
/// <returns>
/// The <see cref="Task" />.
/// </returns>
Task<TodoItem> Get(int id);

/// <summary>
/// The get all.
/// </summary>
/// <returns>
/// The <see cref="Task" />.
/// </returns>
Task<IEnumerable<TodoItem>> GetAll();
}
}
99 changes: 74 additions & 25 deletions src/Samples/Todo.Core/InMemoryTaskRepository.cs
Original file line number Diff line number Diff line change
@@ -1,49 +1,98 @@
using System.Collections.Generic;
using System.Threading.Tasks;

// --------------------------------------------------------------------------------------------------------------------
// <copyright file="InMemoryTaskRepository.cs" company="TestStack">
// All rights reserved.
// </copyright>
// <summary>
// In memory repository where all operations take at least 1 second
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace Todo.Core
{
using System.Collections.Generic;
using System.Threading.Tasks;

/// <summary>
/// In memory repository where all operations take at least 1 second
/// In memory repository where all operations take at least 1 second
/// </summary>
public class InMemoryTaskRepository : ITaskRepository
{
/// <summary>
/// The tasks.
/// </summary>
private readonly Dictionary<int, TodoItem> tasks = new Dictionary<int, TodoItem>();
private int currentId;

public Task<IEnumerable<TodoItem>> GetAll()
{
return TaskEx.Delay(1500)
.ContinueWith<IEnumerable<TodoItem>>(t => tasks.Values);
}
/// <summary>
/// The current id.
/// </summary>
private int currentId;

/// <summary>
/// The add.
/// </summary>
/// <param name="todoItem">
/// The to-do item.
/// </param>
/// <returns>
/// The <see cref="Task" />.
/// </returns>
public Task Add(TodoItem todoItem)
{
return TaskEx.Delay(1500)
.ContinueWith(t => tasks.Add(currentId++, todoItem));
return TaskEx.Delay(1500).ContinueWith(t => this.tasks.Add(this.currentId++, todoItem));
}

/// <summary>
/// The delete.
/// </summary>
/// <param name="id">
/// The id.
/// </param>
/// <returns>
/// The <see cref="Task" />.
/// </returns>
public Task Delete(int id)
{
return TaskEx.Delay(1500)
.ContinueWith(t =>
{
if (tasks.ContainsKey(id))
tasks.Remove(id);
});
return TaskEx.Delay(1500).ContinueWith(
t =>
{
if (tasks.ContainsKey(id))
{
this.tasks.Remove(id);
}
});
}

/// <summary>
/// The get.
/// </summary>
/// <param name="id">
/// The id.
/// </param>
/// <returns>
/// The <see cref="Task" />.
/// </returns>
public Task<TodoItem> Get(int id)
{
return TaskEx.Delay(1500)
.ContinueWith(t =>
{
if (tasks.ContainsKey(id))
return tasks[id];
return TaskEx.Delay(1500).ContinueWith(
t =>
{
if (tasks.ContainsKey(id))
{
return tasks[id];
}

return null;
});
return null;
});
}

/// <summary>
/// The get all.
/// </summary>
/// <returns>
/// The <see cref="Task" />.
/// </returns>
public Task<IEnumerable<TodoItem>> GetAll()
{
return TaskEx.Delay(1500).ContinueWith<IEnumerable<TodoItem>>(t => this.tasks.Values);
}
}
}
32 changes: 28 additions & 4 deletions src/Samples/Todo.Core/NotifyPropertyChanged.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,39 @@
using System.ComponentModel;

// --------------------------------------------------------------------------------------------------------------------
// <copyright file="NotifyPropertyChanged.cs" company="TestStack">
// All rights reserved.
// </copyright>
// <summary>
// Defines the NotifyPropertyChanged type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace Todo.Core
{
using System.ComponentModel;

/// <summary>
/// The notify property changed.
/// </summary>
public class NotifyPropertyChanged : INotifyPropertyChanged
{
/// <summary>
/// The property changed.
/// </summary>
public event PropertyChangedEventHandler PropertyChanged;

/// <summary>
/// The on property changed.
/// </summary>
/// <param name="propertyName">
/// The property name.
/// </param>
protected void OnPropertyChanged(string propertyName)
{
var handler = PropertyChanged;
if (handler == null) return;
var handler = this.PropertyChanged;
if (handler == null)
{
return;
}

var e = new PropertyChangedEventArgs(propertyName);
handler(this, e);
}
Expand Down
5 changes: 1 addition & 4 deletions src/Samples/Todo.Core/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand All @@ -23,14 +22,12 @@
[assembly: Guid("1ba903ca-ae6d-418c-a41b-80d8b9c792b4")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
30 changes: 26 additions & 4 deletions src/Samples/Todo.Core/TodoItem.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@
using System;

// --------------------------------------------------------------------------------------------------------------------
// <copyright file="TodoItem.cs" company="TestStack">
// All rights reserved.
// </copyright>
// <summary>
// Defines the TodoItem type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace Todo.Core
{
using System;

/// <summary>
/// The to-do item.
/// </summary>
public class TodoItem : NotifyPropertyChanged
{
public string Title { get; set; }
/// <summary>
/// Gets or sets the description.
/// </summary>
public string Description { get; set; }

/// <summary>
/// Gets or sets the due date.
/// </summary>
public DateTime? DueDate { get; set; }

/// <summary>
/// Gets or sets the title.
/// </summary>
public string Title { get; set; }
}
}
}
1 change: 1 addition & 0 deletions src/Samples/Todo.Core/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>

<packages>
<package id="Fody" version="1.29.4" targetFramework="net40" developmentDependency="true" />
<package id="Microsoft.CompilerServices.AsyncTargetingPack" version="1.0.0" targetFramework="net40" />
Expand Down
22 changes: 18 additions & 4 deletions src/Samples/WinForms/WinformsTodo/Form1.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
using System.Windows.Forms;

// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Form1.cs" company="TestStack">
// All rights reserved.
// </copyright>
// <summary>
// Defines the Form1 type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace WinformsTodo
{
using System.Windows.Forms;

/// <summary>
/// The form 1.
/// </summary>
public partial class Form1 : Form
{
/// <summary>
/// Initializes a new instance of the <see cref="Form1" /> class.
/// </summary>
public Form1()
{
InitializeComponent();
this.InitializeComponent();
}
}
}
}
Loading