From 12a91cce9ee0f3675a8df44a9a204137c0b136b9 Mon Sep 17 00:00:00 2001 From: JamesNK Date: Tue, 31 Aug 2010 02:19:41 +0000 Subject: [PATCH] -Updated source code to VS2010 -Updated main project to .NET 4.0 -Updated to psake 4.0 -Changed assembly version to 4.0.0.0 -Added ICustomTypeDescriptor implementation to JObject, removed JTypeDescriptionProvider and JTypeDescriptor -Changed serialization of collections to use iterator rather than indexer -Removed Compact Framework project -Fixed XML documentation warnings --- Build/build.ps1 | 15 +- Src/Newtonsoft.Json.Compact.sln | 31 - Src/Newtonsoft.Json.Net20.sln | 4 +- Src/Newtonsoft.Json.Silverlight.sln | 4 +- .../FileSystemEntityModel.Designer.cs | 445 ++++--- .../FileSystemEntityModel.edmx | 20 +- .../JTypeDescriptionProviderTests.cs | 49 - .../ComponentModel/JTypeDescriptorTests.cs | 80 -- .../Linq/JObjectTests.cs | 41 + .../LinqToSql/LinqToSqlClasses.designer.cs | 44 +- .../Newtonsoft.Json.Tests.Compact.csproj | 229 ---- .../Newtonsoft.Json.Tests.Net20.csproj | 43 +- .../Newtonsoft.Json.Tests.Silverlight.csproj | 50 +- .../Newtonsoft.Json.Tests.csproj | 45 +- .../SerializationErrorHandlingTests.cs | 53 +- .../Serialization/TypeNameHandlingTests.cs | 6 +- .../TestObjects/VersionKeyedCollection.cs | 18 +- Src/Newtonsoft.Json.sln | 4 +- Src/Newtonsoft.Json/JsonTextWriter.cs | 4 +- .../ComponentModel/JPropertyDescriptor.cs | 2 - .../JTypeDescriptionProvider.cs | 47 - .../Linq/ComponentModel/JTypeDescriptor.cs | 209 --- Src/Newtonsoft.Json/Linq/JContainer.cs | 10 +- Src/Newtonsoft.Json/Linq/JObject.cs | 165 ++- .../Linq/JTokenEqualityComparer.cs | 4 +- .../Newtonsoft.Json.Compact.csproj | 223 ---- .../Newtonsoft.Json.Net20.csproj | 29 +- .../Newtonsoft.Json.Silverlight.csproj | 51 +- Src/Newtonsoft.Json/Newtonsoft.Json.csproj | 29 +- Src/Newtonsoft.Json/Newtonsoft.Json.ruleset | 234 ++++ .../Properties/AssemblyInfo.cs | 4 +- .../Serialization/JsonArrayContract.cs | 20 +- .../JsonSerializerInternalWriter.cs | 51 +- .../Utilities/CollectionWrapper.cs | 16 +- Src/Newtonsoft.Json/Utilities/ConvertUtils.cs | 6 +- Src/Newtonsoft.Json/Utilities/ListWrapper.cs | 148 +- Tools/PSake/psake.psm1 | 1185 +++++++++-------- 37 files changed, 1686 insertions(+), 1932 deletions(-) delete mode 100644 Src/Newtonsoft.Json.Compact.sln delete mode 100644 Src/Newtonsoft.Json.Tests/Linq/ComponentModel/JTypeDescriptionProviderTests.cs delete mode 100644 Src/Newtonsoft.Json.Tests/Linq/ComponentModel/JTypeDescriptorTests.cs delete mode 100644 Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Compact.csproj delete mode 100644 Src/Newtonsoft.Json/Linq/ComponentModel/JTypeDescriptionProvider.cs delete mode 100644 Src/Newtonsoft.Json/Linq/ComponentModel/JTypeDescriptor.cs delete mode 100644 Src/Newtonsoft.Json/Newtonsoft.Json.Compact.csproj create mode 100644 Src/Newtonsoft.Json/Newtonsoft.Json.ruleset diff --git a/Build/build.ps1 b/Build/build.ps1 index 36e6ceec..7270fe6f 100644 --- a/Build/build.ps1 +++ b/Build/build.ps1 @@ -1,4 +1,5 @@ properties { + $zipFileName = "Json35r8.zip" $signAssemblies = $false $signKeyPath = "D:\Development\Releases\newtonsoft.snk" @@ -12,12 +13,13 @@ $releaseDir = "$baseDir\Release" $workingDir = "$baseDir\Working" $builds = @( - @{Name = "Newtonsoft.Json.Silverlight"; TestsName = "Newtonsoft.Json.Tests.Silverlight"; Constants="SILVERLIGHT"; FinalDir="Silverlight"}, - @{Name = "Newtonsoft.Json.Compact"; TestsName = "Newtonsoft.Json.Tests.Compact"; Constants="PocketPC"; FinalDir="Compact"}, - @{Name = "Newtonsoft.Json.Net20"; TestsName = "Newtonsoft.Json.Tests.Net20"; Constants="NET20"; FinalDir="DotNet20"}, - @{Name = "Newtonsoft.Json"; TestsName = "Newtonsoft.Json.Tests"; Constants=""; FinalDir="DotNet"} + @{Name = "Newtonsoft.Json"; TestsName = "Newtonsoft.Json.Tests"; Constants=""; FinalDir="DotNet"; Framework="net-4.0"}, + @{Name = "Newtonsoft.Json.Silverlight"; TestsName = "Newtonsoft.Json.Tests.Silverlight"; Constants="SILVERLIGHT"; FinalDir="Silverlight"; Framework="net-2.0"}, + @{Name = "Newtonsoft.Json.Net20"; TestsName = "Newtonsoft.Json.Tests.Net20"; Constants="NET20"; FinalDir="DotNet20"; Framework="net-2.0"} ) -} +} + +$framework = '4.0x86' task default -depends Test @@ -101,6 +103,7 @@ task Test -depends Deploy { { $name = $build.TestsName $finalDir = $build.FinalDir + $framework = $build.Framework Write-Host -ForegroundColor Green "Copying test assembly $name to deployed directory" Write-Host @@ -110,7 +113,7 @@ task Test -depends Deploy { Write-Host -ForegroundColor Green "Running tests " $name Write-Host - exec { .\Tools\NUnit\nunit-console.exe "$workingDir\Deployed\Bin\$finalDir\$name.dll" /xml:$workingDir\$name.xml } "Error running $name tests" + exec { .\Tools\NUnit\nunit-console.exe "$workingDir\Deployed\Bin\$finalDir\$name.dll" /framework=$framework /xml:$workingDir\$name.xml } "Error running $name tests" } } diff --git a/Src/Newtonsoft.Json.Compact.sln b/Src/Newtonsoft.Json.Compact.sln deleted file mode 100644 index 20d6a799..00000000 --- a/Src/Newtonsoft.Json.Compact.sln +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Newtonsoft.Json.Compact", "Newtonsoft.Json\Newtonsoft.Json.Compact.csproj", "{256AA604-F61B-4B6D-8D51-C8E6AB11E435}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{9ACB12BA-F27A-4BC4-A8C7-9A5B0DD02DF2}" - ProjectSection(SolutionItems) = preProject - Lib\NUnit\Compact\NUnitLite.dll = Lib\NUnit\Compact\NUnitLite.dll - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Newtonsoft.Json.Tests.Compact", "Newtonsoft.Json.Tests\Newtonsoft.Json.Tests.Compact.csproj", "{32EA9694-4FB3-43E9-A6AD-050F1D35EA0A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {256AA604-F61B-4B6D-8D51-C8E6AB11E435}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {256AA604-F61B-4B6D-8D51-C8E6AB11E435}.Debug|Any CPU.Build.0 = Debug|Any CPU - {256AA604-F61B-4B6D-8D51-C8E6AB11E435}.Release|Any CPU.ActiveCfg = Release|Any CPU - {256AA604-F61B-4B6D-8D51-C8E6AB11E435}.Release|Any CPU.Build.0 = Release|Any CPU - {32EA9694-4FB3-43E9-A6AD-050F1D35EA0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {32EA9694-4FB3-43E9-A6AD-050F1D35EA0A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {32EA9694-4FB3-43E9-A6AD-050F1D35EA0A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {32EA9694-4FB3-43E9-A6AD-050F1D35EA0A}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Src/Newtonsoft.Json.Net20.sln b/Src/Newtonsoft.Json.Net20.sln index 76da8f88..e47a28c2 100644 --- a/Src/Newtonsoft.Json.Net20.sln +++ b/Src/Newtonsoft.Json.Net20.sln @@ -1,6 +1,6 @@  -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{620042D9-2753-48F5-BEDE-3905248781D2}" ProjectSection(SolutionItems) = preProject Lib\LinqBridge.dll = Lib\LinqBridge.dll diff --git a/Src/Newtonsoft.Json.Silverlight.sln b/Src/Newtonsoft.Json.Silverlight.sln index c21d60a9..0eede851 100644 --- a/Src/Newtonsoft.Json.Silverlight.sln +++ b/Src/Newtonsoft.Json.Silverlight.sln @@ -1,6 +1,6 @@  -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{F69285DD-24FB-4A60-AE8B-4C2744285D0F}" ProjectSection(SolutionItems) = preProject Lib\NUnit\Silverlight\nunit.framework.dll = Lib\NUnit\Silverlight\nunit.framework.dll diff --git a/Src/Newtonsoft.Json.Tests/FileSystemEntityModel.Designer.cs b/Src/Newtonsoft.Json.Tests/FileSystemEntityModel.Designer.cs index cc3a68ab..ab309e6c 100644 --- a/Src/Newtonsoft.Json.Tests/FileSystemEntityModel.Designer.cs +++ b/Src/Newtonsoft.Json.Tests/FileSystemEntityModel.Designer.cs @@ -1,116 +1,150 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:2.0.50727.3074 +// This code was generated from a template. // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. // //------------------------------------------------------------------------------ -[assembly: global::System.Data.Objects.DataClasses.EdmSchemaAttribute()] -[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("DataServicesTestDatabaseModel", "FK_File_Folder", "Folder", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(Newtonsoft.Json.Tests.Folder), "File", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(Newtonsoft.Json.Tests.File))] -[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("DataServicesTestDatabaseModel", "FK_Folder_Folder", "Folder", global::System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(Newtonsoft.Json.Tests.Folder), "Folder1", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(Newtonsoft.Json.Tests.Folder))] +using System; +using System.Data.Objects; +using System.Data.Objects.DataClasses; +using System.Data.EntityClient; +using System.ComponentModel; +using System.Xml.Serialization; +using System.Runtime.Serialization; + +[assembly: EdmSchemaAttribute()] +#region EDM Relationship Metadata + +[assembly: EdmRelationshipAttribute("DataServicesTestDatabaseModel", "FK_File_Folder", "Folder", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(Newtonsoft.Json.Tests.Folder), "File", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(Newtonsoft.Json.Tests.File))] +[assembly: EdmRelationshipAttribute("DataServicesTestDatabaseModel", "FK_Folder_Folder", "Folder", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(Newtonsoft.Json.Tests.Folder), "Folder1", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(Newtonsoft.Json.Tests.Folder))] + +#endregion -// Original file name: -// Generation date: 26/07/2009 4:51:53 p.m. namespace Newtonsoft.Json.Tests { + #region Contexts /// - /// There are no comments for DataServicesTestDatabaseEntities in the schema. + /// No Metadata Documentation available. /// - public partial class DataServicesTestDatabaseEntities : global::System.Data.Objects.ObjectContext + public partial class DataServicesTestDatabaseEntities : ObjectContext { + #region Constructors + /// /// Initializes a new DataServicesTestDatabaseEntities object using the connection string found in the 'DataServicesTestDatabaseEntities' section of the application configuration file. /// - public DataServicesTestDatabaseEntities() : - base("name=DataServicesTestDatabaseEntities", "DataServicesTestDatabaseEntities") + public DataServicesTestDatabaseEntities() : base("name=DataServicesTestDatabaseEntities", "DataServicesTestDatabaseEntities") { - this.OnContextCreated(); + OnContextCreated(); } + /// /// Initialize a new DataServicesTestDatabaseEntities object. /// - public DataServicesTestDatabaseEntities(string connectionString) : - base(connectionString, "DataServicesTestDatabaseEntities") + public DataServicesTestDatabaseEntities(string connectionString) : base(connectionString, "DataServicesTestDatabaseEntities") { - this.OnContextCreated(); + OnContextCreated(); } + /// /// Initialize a new DataServicesTestDatabaseEntities object. /// - public DataServicesTestDatabaseEntities(global::System.Data.EntityClient.EntityConnection connection) : - base(connection, "DataServicesTestDatabaseEntities") + public DataServicesTestDatabaseEntities(EntityConnection connection) : base(connection, "DataServicesTestDatabaseEntities") { - this.OnContextCreated(); + OnContextCreated(); } + + #endregion + + #region Partial Methods + partial void OnContextCreated(); + + #endregion + + #region ObjectSet Properties + /// - /// There are no comments for File in the schema. + /// No Metadata Documentation available. /// - public global::System.Data.Objects.ObjectQuery File + public ObjectSet File { get { - if ((this._File == null)) + if ((_File == null)) { - this._File = base.CreateQuery("[File]"); + _File = base.CreateObjectSet("File"); } - return this._File; + return _File; } } - private global::System.Data.Objects.ObjectQuery _File; + private ObjectSet _File; + /// - /// There are no comments for Folder in the schema. + /// No Metadata Documentation available. /// - public global::System.Data.Objects.ObjectQuery Folder + public ObjectSet Folder { get { - if ((this._Folder == null)) + if ((_Folder == null)) { - this._Folder = base.CreateQuery("[Folder]"); + _Folder = base.CreateObjectSet("Folder"); } - return this._Folder; + return _Folder; } } - private global::System.Data.Objects.ObjectQuery _Folder; + private ObjectSet _Folder; + + #endregion + #region AddTo Methods + /// - /// There are no comments for File in the schema. + /// Deprecated Method for adding a new object to the File EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// public void AddToFile(File file) { base.AddObject("File", file); } + /// - /// There are no comments for Folder in the schema. + /// Deprecated Method for adding a new object to the Folder EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// public void AddToFolder(Folder folder) { base.AddObject("Folder", folder); } + + #endregion } + + + #endregion + + #region Entities + /// - /// There are no comments for DataServicesTestDatabaseModel.File in the schema. + /// No Metadata Documentation available. /// - /// - /// FileId - /// - [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="DataServicesTestDatabaseModel", Name="File")] - [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)] - [global::System.Serializable()] - public partial class File : global::System.Data.Objects.DataClasses.EntityObject + [EdmEntityTypeAttribute(NamespaceName="DataServicesTestDatabaseModel", Name="File")] + [Serializable()] + [DataContractAttribute(IsReference=true)] + public partial class File : EntityObject { + #region Factory Method + /// /// Create a new File object. /// - /// Initial value of FileId. - /// Initial value of Name. - /// Initial value of Description. - /// Initial value of CreatedDate. - public static File CreateFile(global::System.Guid fileId, string name, string description, global::System.DateTime createdDate) + /// Initial value of the FileId property. + /// Initial value of the Name property. + /// Initial value of the Description property. + /// Initial value of the CreatedDate property. + public static File CreateFile(global::System.Guid fileId, global::System.String name, global::System.String description, global::System.DateTime createdDate) { File file = new File(); file.FileId = fileId; @@ -119,331 +153,372 @@ namespace Newtonsoft.Json.Tests file.CreatedDate = createdDate; return file; } + + #endregion + #region Primitive Properties + /// - /// There are no comments for Property FileId in the schema. + /// No Metadata Documentation available. /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] + [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] + [DataMemberAttribute()] public global::System.Guid FileId { get { - return this._FileId; + return _FileId; } set { - this.OnFileIdChanging(value); - this.ReportPropertyChanging("FileId"); - this._FileId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("FileId"); - this.OnFileIdChanged(); + if (_FileId != value) + { + OnFileIdChanging(value); + ReportPropertyChanging("FileId"); + _FileId = StructuralObject.SetValidValue(value); + ReportPropertyChanged("FileId"); + OnFileIdChanged(); + } } } private global::System.Guid _FileId; partial void OnFileIdChanging(global::System.Guid value); partial void OnFileIdChanged(); + /// - /// There are no comments for Property Name in the schema. + /// No Metadata Documentation available. /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string Name + [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] + [DataMemberAttribute()] + public global::System.String Name { get { - return this._Name; + return _Name; } set { - this.OnNameChanging(value); - this.ReportPropertyChanging("Name"); - this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false); - this.ReportPropertyChanged("Name"); - this.OnNameChanged(); + OnNameChanging(value); + ReportPropertyChanging("Name"); + _Name = StructuralObject.SetValidValue(value, false); + ReportPropertyChanged("Name"); + OnNameChanged(); } } - private string _Name; - partial void OnNameChanging(string value); + private global::System.String _Name; + partial void OnNameChanging(global::System.String value); partial void OnNameChanged(); + /// - /// There are no comments for Property Description in the schema. + /// No Metadata Documentation available. /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string Description + [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] + [DataMemberAttribute()] + public global::System.String Description { get { - return this._Description; + return _Description; } set { - this.OnDescriptionChanging(value); - this.ReportPropertyChanging("Description"); - this._Description = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false); - this.ReportPropertyChanged("Description"); - this.OnDescriptionChanged(); + OnDescriptionChanging(value); + ReportPropertyChanging("Description"); + _Description = StructuralObject.SetValidValue(value, false); + ReportPropertyChanged("Description"); + OnDescriptionChanged(); } } - private string _Description; - partial void OnDescriptionChanging(string value); + private global::System.String _Description; + partial void OnDescriptionChanging(global::System.String value); partial void OnDescriptionChanged(); + /// - /// There are no comments for Property CreatedDate in the schema. + /// No Metadata Documentation available. /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] + [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] + [DataMemberAttribute()] public global::System.DateTime CreatedDate { get { - return this._CreatedDate; + return _CreatedDate; } set { - this.OnCreatedDateChanging(value); - this.ReportPropertyChanging("CreatedDate"); - this._CreatedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("CreatedDate"); - this.OnCreatedDateChanged(); + OnCreatedDateChanging(value); + ReportPropertyChanging("CreatedDate"); + _CreatedDate = StructuralObject.SetValidValue(value); + ReportPropertyChanged("CreatedDate"); + OnCreatedDateChanged(); } } private global::System.DateTime _CreatedDate; partial void OnCreatedDateChanging(global::System.DateTime value); partial void OnCreatedDateChanged(); + + #endregion + + #region Navigation Properties + /// - /// There are no comments for Folder in the schema. + /// No Metadata Documentation available. /// - [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("DataServicesTestDatabaseModel", "FK_File_Folder", "Folder")] - [global::System.Xml.Serialization.XmlIgnoreAttribute()] - [global::System.Xml.Serialization.SoapIgnoreAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] + [XmlIgnoreAttribute()] + [SoapIgnoreAttribute()] + [DataMemberAttribute()] + [EdmRelationshipNavigationPropertyAttribute("DataServicesTestDatabaseModel", "FK_File_Folder", "Folder")] public Folder Folder { get { - return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("DataServicesTestDatabaseModel.FK_File_Folder", "Folder").Value; + return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DataServicesTestDatabaseModel.FK_File_Folder", "Folder").Value; } set { - ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("DataServicesTestDatabaseModel.FK_File_Folder", "Folder").Value = value; + ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DataServicesTestDatabaseModel.FK_File_Folder", "Folder").Value = value; } } /// - /// There are no comments for Folder in the schema. + /// No Metadata Documentation available. /// - [global::System.ComponentModel.BrowsableAttribute(false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Data.Objects.DataClasses.EntityReference FolderReference + [BrowsableAttribute(false)] + [DataMemberAttribute()] + public EntityReference FolderReference { get { - return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("DataServicesTestDatabaseModel.FK_File_Folder", "Folder"); + return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DataServicesTestDatabaseModel.FK_File_Folder", "Folder"); } set { if ((value != null)) { - ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference("DataServicesTestDatabaseModel.FK_File_Folder", "Folder", value); + ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("DataServicesTestDatabaseModel.FK_File_Folder", "Folder", value); } } } + + #endregion } + /// - /// There are no comments for DataServicesTestDatabaseModel.Folder in the schema. + /// No Metadata Documentation available. /// - /// - /// FolderId - /// - [global::System.Data.Objects.DataClasses.EdmEntityTypeAttribute(NamespaceName="DataServicesTestDatabaseModel", Name="Folder")] - [global::System.Runtime.Serialization.DataContractAttribute(IsReference=true)] - [global::System.Serializable()] - public partial class Folder : global::System.Data.Objects.DataClasses.EntityObject + [EdmEntityTypeAttribute(NamespaceName="DataServicesTestDatabaseModel", Name="Folder")] + [Serializable()] + [DataContractAttribute(IsReference=true)] + public partial class Folder : EntityObject { + #region Factory Method + /// /// Create a new Folder object. /// - /// Initial value of FolderId. - /// Initial value of Name. - /// Initial value of CreatedDate. - public static Folder CreateFolder(global::System.Guid folderId, string name, global::System.DateTime createdDate) + /// Initial value of the FolderId property. + /// Initial value of the Name property. + /// Initial value of the Description property. + /// Initial value of the CreatedDate property. + public static Folder CreateFolder(global::System.Guid folderId, global::System.String name, global::System.String description, global::System.DateTime createdDate) { Folder folder = new Folder(); folder.FolderId = folderId; folder.Name = name; + folder.Description = description; folder.CreatedDate = createdDate; return folder; } + + #endregion + #region Primitive Properties + /// - /// There are no comments for Property FolderId in the schema. + /// No Metadata Documentation available. /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] + [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)] + [DataMemberAttribute()] public global::System.Guid FolderId { get { - return this._FolderId; + return _FolderId; } set { - this.OnFolderIdChanging(value); - this.ReportPropertyChanging("FolderId"); - this._FolderId = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("FolderId"); - this.OnFolderIdChanged(); + if (_FolderId != value) + { + OnFolderIdChanging(value); + ReportPropertyChanging("FolderId"); + _FolderId = StructuralObject.SetValidValue(value); + ReportPropertyChanged("FolderId"); + OnFolderIdChanged(); + } } } private global::System.Guid _FolderId; partial void OnFolderIdChanging(global::System.Guid value); partial void OnFolderIdChanged(); + /// - /// There are no comments for Property Name in the schema. + /// No Metadata Documentation available. /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string Name + [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] + [DataMemberAttribute()] + public global::System.String Name { get { - return this._Name; + return _Name; } set { - this.OnNameChanging(value); - this.ReportPropertyChanging("Name"); - this._Name = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, false); - this.ReportPropertyChanged("Name"); - this.OnNameChanged(); + OnNameChanging(value); + ReportPropertyChanging("Name"); + _Name = StructuralObject.SetValidValue(value, false); + ReportPropertyChanged("Name"); + OnNameChanged(); } } - private string _Name; - partial void OnNameChanging(string value); + private global::System.String _Name; + partial void OnNameChanging(global::System.String value); partial void OnNameChanged(); + /// - /// There are no comments for Property Description in the schema. + /// No Metadata Documentation available. /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public string Description + [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] + [DataMemberAttribute()] + public global::System.String Description { get { - return this._Description; + return _Description; } set { - this.OnDescriptionChanging(value); - this.ReportPropertyChanging("Description"); - this._Description = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true); - this.ReportPropertyChanged("Description"); - this.OnDescriptionChanged(); + OnDescriptionChanging(value); + ReportPropertyChanging("Description"); + _Description = StructuralObject.SetValidValue(value, false); + ReportPropertyChanged("Description"); + OnDescriptionChanged(); } } - private string _Description; - partial void OnDescriptionChanging(string value); + private global::System.String _Description; + partial void OnDescriptionChanging(global::System.String value); partial void OnDescriptionChanged(); + /// - /// There are no comments for Property CreatedDate in the schema. + /// No Metadata Documentation available. /// - [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable=false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] + [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)] + [DataMemberAttribute()] public global::System.DateTime CreatedDate { get { - return this._CreatedDate; + return _CreatedDate; } set { - this.OnCreatedDateChanging(value); - this.ReportPropertyChanging("CreatedDate"); - this._CreatedDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value); - this.ReportPropertyChanged("CreatedDate"); - this.OnCreatedDateChanged(); + OnCreatedDateChanging(value); + ReportPropertyChanging("CreatedDate"); + _CreatedDate = StructuralObject.SetValidValue(value); + ReportPropertyChanged("CreatedDate"); + OnCreatedDateChanged(); } } private global::System.DateTime _CreatedDate; partial void OnCreatedDateChanging(global::System.DateTime value); partial void OnCreatedDateChanged(); + + #endregion + + #region Navigation Properties + /// - /// There are no comments for Files in the schema. + /// No Metadata Documentation available. /// - [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("DataServicesTestDatabaseModel", "FK_File_Folder", "File")] - [global::System.Xml.Serialization.XmlIgnoreAttribute()] - [global::System.Xml.Serialization.SoapIgnoreAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Data.Objects.DataClasses.EntityCollection Files + [XmlIgnoreAttribute()] + [SoapIgnoreAttribute()] + [DataMemberAttribute()] + [EdmRelationshipNavigationPropertyAttribute("DataServicesTestDatabaseModel", "FK_File_Folder", "File")] + public EntityCollection Files { get { - return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection("DataServicesTestDatabaseModel.FK_File_Folder", "File"); + return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("DataServicesTestDatabaseModel.FK_File_Folder", "File"); } set { if ((value != null)) { - ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection("DataServicesTestDatabaseModel.FK_File_Folder", "File", value); + ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("DataServicesTestDatabaseModel.FK_File_Folder", "File", value); } } } + /// - /// There are no comments for ChildFolders in the schema. + /// No Metadata Documentation available. /// - [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("DataServicesTestDatabaseModel", "FK_Folder_Folder", "Folder1")] - [global::System.Xml.Serialization.XmlIgnoreAttribute()] - [global::System.Xml.Serialization.SoapIgnoreAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Data.Objects.DataClasses.EntityCollection ChildFolders + [XmlIgnoreAttribute()] + [SoapIgnoreAttribute()] + [DataMemberAttribute()] + [EdmRelationshipNavigationPropertyAttribute("DataServicesTestDatabaseModel", "FK_Folder_Folder", "Folder1")] + public EntityCollection ChildFolders { get { - return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder1"); + return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder1"); } set { if ((value != null)) { - ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedCollection("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder1", value); + ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder1", value); } } } + /// - /// There are no comments for ParentFolder in the schema. + /// No Metadata Documentation available. /// - [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("DataServicesTestDatabaseModel", "FK_Folder_Folder", "Folder")] - [global::System.Xml.Serialization.XmlIgnoreAttribute()] - [global::System.Xml.Serialization.SoapIgnoreAttribute()] - [global::System.Runtime.Serialization.DataMemberAttribute()] + [XmlIgnoreAttribute()] + [SoapIgnoreAttribute()] + [DataMemberAttribute()] + [EdmRelationshipNavigationPropertyAttribute("DataServicesTestDatabaseModel", "FK_Folder_Folder", "Folder")] public Folder ParentFolder { get { - return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder").Value; + return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder").Value; } set { - ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder").Value = value; + ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder").Value = value; } } /// - /// There are no comments for ParentFolder in the schema. + /// No Metadata Documentation available. /// - [global::System.ComponentModel.BrowsableAttribute(false)] - [global::System.Runtime.Serialization.DataMemberAttribute()] - public global::System.Data.Objects.DataClasses.EntityReference ParentFolderReference + [BrowsableAttribute(false)] + [DataMemberAttribute()] + public EntityReference ParentFolderReference { get { - return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedReference("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder"); + return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder"); } set { if ((value != null)) { - ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.InitializeRelatedReference("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder", value); + ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference("DataServicesTestDatabaseModel.FK_Folder_Folder", "Folder", value); } } } + + #endregion } + + #endregion + } diff --git a/Src/Newtonsoft.Json.Tests/FileSystemEntityModel.edmx b/Src/Newtonsoft.Json.Tests/FileSystemEntityModel.edmx index e80aa796..3e912342 100644 --- a/Src/Newtonsoft.Json.Tests/FileSystemEntityModel.edmx +++ b/Src/Newtonsoft.Json.Tests/FileSystemEntityModel.edmx @@ -1,13 +1,13 @@  - + - + - - + + @@ -65,7 +65,7 @@ - + @@ -112,7 +112,7 @@ - + @@ -156,20 +156,20 @@ - + - + - + - + diff --git a/Src/Newtonsoft.Json.Tests/Linq/ComponentModel/JTypeDescriptionProviderTests.cs b/Src/Newtonsoft.Json.Tests/Linq/ComponentModel/JTypeDescriptionProviderTests.cs deleted file mode 100644 index 1dafce03..00000000 --- a/Src/Newtonsoft.Json.Tests/Linq/ComponentModel/JTypeDescriptionProviderTests.cs +++ /dev/null @@ -1,49 +0,0 @@ -#region License -// Copyright (c) 2007 James Newton-King -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the "Software"), to deal in the Software without -// restriction, including without limitation the rights to use, -// copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following -// conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -// OTHER DEALINGS IN THE SOFTWARE. -#endregion - -#if !PocketPC && !SILVERLIGHT -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using NUnit.Framework; -using Newtonsoft.Json.Linq; -using System.ComponentModel; -using Newtonsoft.Json.Linq.ComponentModel; - -namespace Newtonsoft.Json.Tests.Linq.ComponentModel -{ - public class JTypeDescriptionProviderTests : TestFixtureBase - { - [Test] - public void GetTypeDescriptor() - { - JTypeDescriptionProvider provider = new JTypeDescriptionProvider(); - JTypeDescriptor descriptor = (JTypeDescriptor)provider.GetTypeDescriptor(typeof (JObject), new JObject()); - Assert.IsNotNull(descriptor); - } - } -} -#endif \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Linq/ComponentModel/JTypeDescriptorTests.cs b/Src/Newtonsoft.Json.Tests/Linq/ComponentModel/JTypeDescriptorTests.cs deleted file mode 100644 index a7bfd71b..00000000 --- a/Src/Newtonsoft.Json.Tests/Linq/ComponentModel/JTypeDescriptorTests.cs +++ /dev/null @@ -1,80 +0,0 @@ -#region License -// Copyright (c) 2007 James Newton-King -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the "Software"), to deal in the Software without -// restriction, including without limitation the rights to use, -// copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following -// conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -// OTHER DEALINGS IN THE SOFTWARE. -#endregion - -#if !SILVERLIGHT -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Newtonsoft.Json.Linq.ComponentModel; -using NUnit.Framework; -using Newtonsoft.Json.Linq; -using System.ComponentModel; - -namespace Newtonsoft.Json.Tests.Linq.ComponentModel -{ - public class JTypeDescriptorTests : TestFixtureBase - { - [Test] - public void GetProperties() - { - JObject o = JObject.Parse("{'prop1':12,'prop2':'hi!','prop3':null,'prop4':[1,2,3]}"); - - JTypeDescriptor descriptor = new JTypeDescriptor(o); - - PropertyDescriptorCollection properties = descriptor.GetProperties(); - Assert.AreEqual(4, properties.Count); - - PropertyDescriptor prop1 = properties[0]; - Assert.AreEqual("prop1", prop1.Name); - Assert.AreEqual(typeof(long), prop1.PropertyType); - Assert.AreEqual(typeof(JObject), prop1.ComponentType); - Assert.AreEqual(false, prop1.CanResetValue(o)); - Assert.AreEqual(false, prop1.ShouldSerializeValue(o)); - - PropertyDescriptor prop2 = properties[1]; - Assert.AreEqual("prop2", prop2.Name); - Assert.AreEqual(typeof(string), prop2.PropertyType); - Assert.AreEqual(typeof(JObject), prop2.ComponentType); - Assert.AreEqual(false, prop2.CanResetValue(o)); - Assert.AreEqual(false, prop2.ShouldSerializeValue(o)); - - PropertyDescriptor prop3 = properties[2]; - Assert.AreEqual("prop3", prop3.Name); - Assert.AreEqual(typeof(object), prop3.PropertyType); - Assert.AreEqual(typeof(JObject), prop3.ComponentType); - Assert.AreEqual(false, prop3.CanResetValue(o)); - Assert.AreEqual(false, prop3.ShouldSerializeValue(o)); - - PropertyDescriptor prop4 = properties[3]; - Assert.AreEqual("prop4", prop4.Name); - Assert.AreEqual(typeof(JArray), prop4.PropertyType); - Assert.AreEqual(typeof(JObject), prop4.ComponentType); - Assert.AreEqual(false, prop4.CanResetValue(o)); - Assert.AreEqual(false, prop4.ShouldSerializeValue(o)); - } - } -} -#endif \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Linq/JObjectTests.cs b/Src/Newtonsoft.Json.Tests/Linq/JObjectTests.cs index 374576ff..dc1264e2 100644 --- a/Src/Newtonsoft.Json.Tests/Linq/JObjectTests.cs +++ b/Src/Newtonsoft.Json.Tests/Linq/JObjectTests.cs @@ -1488,5 +1488,46 @@ Parameter name: arrayIndex")] JObject.Parse(json); } + +#if !SILVERLIGHT + [Test] + public void GetProperties() + { + JObject o = JObject.Parse("{'prop1':12,'prop2':'hi!','prop3':null,'prop4':[1,2,3]}"); + + ICustomTypeDescriptor descriptor = o; + + PropertyDescriptorCollection properties = descriptor.GetProperties(); + Assert.AreEqual(4, properties.Count); + + PropertyDescriptor prop1 = properties[0]; + Assert.AreEqual("prop1", prop1.Name); + Assert.AreEqual(typeof(long), prop1.PropertyType); + Assert.AreEqual(typeof(JObject), prop1.ComponentType); + Assert.AreEqual(false, prop1.CanResetValue(o)); + Assert.AreEqual(false, prop1.ShouldSerializeValue(o)); + + PropertyDescriptor prop2 = properties[1]; + Assert.AreEqual("prop2", prop2.Name); + Assert.AreEqual(typeof(string), prop2.PropertyType); + Assert.AreEqual(typeof(JObject), prop2.ComponentType); + Assert.AreEqual(false, prop2.CanResetValue(o)); + Assert.AreEqual(false, prop2.ShouldSerializeValue(o)); + + PropertyDescriptor prop3 = properties[2]; + Assert.AreEqual("prop3", prop3.Name); + Assert.AreEqual(typeof(object), prop3.PropertyType); + Assert.AreEqual(typeof(JObject), prop3.ComponentType); + Assert.AreEqual(false, prop3.CanResetValue(o)); + Assert.AreEqual(false, prop3.ShouldSerializeValue(o)); + + PropertyDescriptor prop4 = properties[3]; + Assert.AreEqual("prop4", prop4.Name); + Assert.AreEqual(typeof(JArray), prop4.PropertyType); + Assert.AreEqual(typeof(JObject), prop4.ComponentType); + Assert.AreEqual(false, prop4.CanResetValue(o)); + Assert.AreEqual(false, prop4.ShouldSerializeValue(o)); + } +#endif } } \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/LinqToSql/LinqToSqlClasses.designer.cs b/Src/Newtonsoft.Json.Tests/LinqToSql/LinqToSqlClasses.designer.cs index 4c978ca0..61df42ca 100644 --- a/Src/Newtonsoft.Json.Tests/LinqToSql/LinqToSqlClasses.designer.cs +++ b/Src/Newtonsoft.Json.Tests/LinqToSql/LinqToSqlClasses.designer.cs @@ -2,7 +2,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3074 +// Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -100,7 +100,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql } } - [Table(Name="")] + [global::System.Data.Linq.Mapping.TableAttribute(Name="")] public partial class Person : INotifyPropertyChanging, INotifyPropertyChanged { @@ -139,7 +139,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql OnCreated(); } - [Column(Storage="_FirstName", CanBeNull=false)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FirstName", CanBeNull=false)] public string FirstName { get @@ -159,7 +159,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql } } - [Column(Storage="_LastName", CanBeNull=false)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastName", CanBeNull=false)] public string LastName { get @@ -179,7 +179,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql } } - [Column(Storage="_PersonId", IsPrimaryKey=true)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonId", IsPrimaryKey=true)] public System.Guid PersonId { get @@ -199,7 +199,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql } } - [Column(Storage="_DepartmentId")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DepartmentId")] public System.Guid DepartmentId { get @@ -223,7 +223,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql } } - [Association(Name="Person_PersonRole", Storage="_PersonRoles", ThisKey="PersonId", OtherKey="PersonId")] + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Person_PersonRole", Storage="_PersonRoles", ThisKey="PersonId", OtherKey="PersonId")] public EntitySet PersonRoles { get @@ -236,7 +236,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql } } - [Association(Name="Department_Person", Storage="_Department", ThisKey="DepartmentId", OtherKey="DepartmentId", IsForeignKey=true)] + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Department_Person", Storage="_Department", ThisKey="DepartmentId", OtherKey="DepartmentId", IsForeignKey=true)] public Department Department { get @@ -303,7 +303,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql } } - [Table(Name="")] + [global::System.Data.Linq.Mapping.TableAttribute(Name="")] public partial class Role : INotifyPropertyChanging, INotifyPropertyChanged { @@ -331,7 +331,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql OnCreated(); } - [Column(Storage="_Name", CanBeNull=false)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", CanBeNull=false)] public string Name { get @@ -351,7 +351,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql } } - [Column(Storage="_RoleId", IsPrimaryKey=true)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoleId", IsPrimaryKey=true)] public System.Guid RoleId { get @@ -371,7 +371,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql } } - [Association(Name="Role_PersonRole", Storage="_PersonRoles", ThisKey="RoleId", OtherKey="RoleId")] + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Role_PersonRole", Storage="_PersonRoles", ThisKey="RoleId", OtherKey="RoleId")] public EntitySet PersonRoles { get @@ -417,7 +417,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql } } - [Table(Name="")] + [global::System.Data.Linq.Mapping.TableAttribute(Name="")] public partial class PersonRole : INotifyPropertyChanging, INotifyPropertyChanged { @@ -452,7 +452,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql OnCreated(); } - [Column(Storage="_PersonId")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonId")] public System.Guid PersonId { get @@ -476,7 +476,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql } } - [Column(Storage="_RoleId")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoleId")] public System.Guid RoleId { get @@ -500,7 +500,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql } } - [Column(Storage="_PersonRoleId", IsPrimaryKey=true)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonRoleId", IsPrimaryKey=true)] public System.Guid PersonRoleId { get @@ -520,7 +520,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql } } - [Association(Name="Person_PersonRole", Storage="_Person", ThisKey="PersonId", OtherKey="PersonId", IsForeignKey=true)] + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Person_PersonRole", Storage="_Person", ThisKey="PersonId", OtherKey="PersonId", IsForeignKey=true)] public Person Person { get @@ -554,7 +554,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql } } - [Association(Name="Role_PersonRole", Storage="_Role", ThisKey="RoleId", OtherKey="RoleId", IsForeignKey=true)] + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Role_PersonRole", Storage="_Role", ThisKey="RoleId", OtherKey="RoleId", IsForeignKey=true)] public Role Role { get @@ -609,7 +609,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql } } - [Table(Name="")] + [global::System.Data.Linq.Mapping.TableAttribute(Name="")] public partial class Department : INotifyPropertyChanging, INotifyPropertyChanged { @@ -637,7 +637,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql OnCreated(); } - [Column(Storage="_DepartmentId", IsPrimaryKey=true)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DepartmentId", IsPrimaryKey=true)] public System.Guid DepartmentId { get @@ -657,7 +657,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql } } - [Column(Storage="_Name", CanBeNull=false)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", CanBeNull=false)] public string Name { get @@ -677,7 +677,7 @@ namespace Newtonsoft.Json.Tests.LinqToSql } } - [Association(Name="Department_Person", Storage="_Persons", ThisKey="DepartmentId", OtherKey="DepartmentId")] + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Department_Person", Storage="_Persons", ThisKey="DepartmentId", OtherKey="DepartmentId")] public EntitySet Persons { get diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Compact.csproj b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Compact.csproj deleted file mode 100644 index cd48bfe0..00000000 --- a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Compact.csproj +++ /dev/null @@ -1,229 +0,0 @@ - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {32EA9694-4FB3-43E9-A6AD-050F1D35EA0A} - Library - Properties - Newtonsoft.Json.Tests - Newtonsoft.Json.Tests.Compact - {4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - PocketPC - b2c48bd2-963d-4549-9169-1fa021dce484 - 5.2 - Newtonsoft.Json.Tests.Compact - v3.5 - Windows Mobile 6 Professional SDK - - - - - true - full - false - bin\Debug\Compact\ - TRACE;DEBUG;PocketPC - true - true - prompt - 512 - 4 - Off - - - pdbonly - true - bin\Release\Compact\ - TRACE;$(PlatformFamilyName) - true - true - prompt - 512 - 4 - Off - - - - - False - ..\Lib\NUnit\Compact\NUnitLite.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {256AA604-F61B-4B6D-8D51-C8E6AB11E435} - Newtonsoft.Json.Compact - - - - - - - - - - - - \ No newline at end of file diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net20.csproj b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net20.csproj index a1684bfa..d32076d4 100644 --- a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net20.csproj +++ b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net20.csproj @@ -1,4 +1,5 @@ - + + Debug AnyCPU @@ -19,15 +20,28 @@ - 2.0 + 3.5 v2.0 false - - + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true true @@ -37,6 +51,7 @@ TRACE;DEBUG;NET20 prompt 4 + AllRules.ruleset pdbonly @@ -45,6 +60,7 @@ TRACE prompt 4 + AllRules.ruleset @@ -77,8 +93,6 @@ - - @@ -220,6 +234,23 @@ Newtonsoft.Json.Net20 + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + - \ No newline at end of file diff --git a/Src/Newtonsoft.Json/Newtonsoft.Json.Net20.csproj b/Src/Newtonsoft.Json/Newtonsoft.Json.Net20.csproj index 465f7803..acf353f1 100644 --- a/Src/Newtonsoft.Json/Newtonsoft.Json.Net20.csproj +++ b/Src/Newtonsoft.Json/Newtonsoft.Json.Net20.csproj @@ -1,4 +1,5 @@ - + + Debug AnyCPU @@ -22,9 +23,11 @@ - 2.0 + 3.5 + false + v2.0 publish\ true Disk @@ -37,12 +40,8 @@ true 0 1.0.0.%2a - false false true - v2.0 - - true @@ -54,7 +53,9 @@ 4 bin\Debug\DotNet20\Newtonsoft.Json.Net20.xml true - -Microsoft.Design#CA1012;-Microsoft.Design#CA2210;-Microsoft.Design#CA1040;-Microsoft.Design#CA1005;-Microsoft.Design#CA1020;-Microsoft.Design#CA1021;-Microsoft.Design#CA1010;-Microsoft.Design#CA1011;-Microsoft.Design#CA1009;-Microsoft.Design#CA1050;-Microsoft.Design#CA1026;-Microsoft.Design#CA1019;-Microsoft.Design#CA1031;-Microsoft.Design#CA1047;-Microsoft.Design#CA1000;-Microsoft.Design#CA1048;-Microsoft.Design#CA1051;-Microsoft.Design#CA1002;-Microsoft.Design#CA1061;-Microsoft.Design#CA1006;-Microsoft.Design#CA1046;-Microsoft.Design#CA1045;-Microsoft.Design#CA1065;-Microsoft.Design#CA1038;-Microsoft.Design#CA1008;-Microsoft.Design#CA1028;-Microsoft.Design#CA1064;-Microsoft.Design#CA1004;-Microsoft.Design#CA1035;-Microsoft.Design#CA1063;-Microsoft.Design#CA1032;-Microsoft.Design#CA1023;-Microsoft.Design#CA1033;-Microsoft.Design#CA1039;-Microsoft.Design#CA1016;-Microsoft.Design#CA1014;-Microsoft.Design#CA1017;-Microsoft.Design#CA1018;-Microsoft.Design#CA1027;-Microsoft.Design#CA1059;-Microsoft.Design#CA1060;-Microsoft.Design#CA1034;-Microsoft.Design#CA1013;-Microsoft.Design#CA1036;-Microsoft.Design#CA1044;-Microsoft.Design#CA1041;-Microsoft.Design#CA1025;-Microsoft.Design#CA1052;-Microsoft.Design#CA1053;-Microsoft.Design#CA1057;-Microsoft.Design#CA1058;-Microsoft.Design#CA1001;-Microsoft.Design#CA1049;-Microsoft.Design#CA1054;-Microsoft.Design#CA1056;-Microsoft.Design#CA1055;-Microsoft.Design#CA1030;-Microsoft.Design#CA1003;-Microsoft.Design#CA1007;-Microsoft.Design#CA1043;-Microsoft.Design#CA1024;-Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1308;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA2101;-Microsoft.Globalization#CA1300;-Microsoft.Globalization#CA1307;-Microsoft.Globalization#CA1309;-Microsoft.Interoperability#CA1403;-Microsoft.Interoperability#CA1406;-Microsoft.Interoperability#CA1413;-Microsoft.Interoperability#CA1402;-Microsoft.Interoperability#CA1407;-Microsoft.Interoperability#CA1404;-Microsoft.Interoperability#CA1410;-Microsoft.Interoperability#CA1411;-Microsoft.Interoperability#CA1405;-Microsoft.Interoperability#CA1409;-Microsoft.Interoperability#CA1415;-Microsoft.Interoperability#CA1408;-Microsoft.Interoperability#CA1414;-Microsoft.Interoperability#CA1412;-Microsoft.Interoperability#CA1400;-Microsoft.Interoperability#CA1401;-Microsoft.Maintainability#CA1506;-Microsoft.Maintainability#CA1502;-Microsoft.Maintainability#CA1501;-Microsoft.Maintainability#CA1505;-Microsoft.Maintainability#CA1504;-Microsoft.Maintainability#CA1500;-Microsoft.Mobility#CA1600;-Microsoft.Mobility#CA1601;-Microsoft.Naming#CA1702;-Microsoft.Naming#CA1700;-Microsoft.Naming#CA1712;-Microsoft.Naming#CA1713;-Microsoft.Naming#CA1714;-Microsoft.Naming#CA1709;-Microsoft.Naming#CA1704;-Microsoft.Naming#CA1708;-Microsoft.Naming#CA1715;-Microsoft.Naming#CA1710;-Microsoft.Naming#CA1720;-Microsoft.Naming#CA1707;-Microsoft.Naming#CA1722;-Microsoft.Naming#CA1711;-Microsoft.Naming#CA1716;-Microsoft.Naming#CA1717;-Microsoft.Naming#CA1725;-Microsoft.Naming#CA1719;-Microsoft.Naming#CA1721;-Microsoft.Naming#CA1701;-Microsoft.Naming#CA1703;-Microsoft.Naming#CA1724;-Microsoft.Naming#CA1726;-Microsoft.Performance#CA1809;-Microsoft.Performance#CA1811;-Microsoft.Performance#CA1812;-Microsoft.Performance#CA1813;-Microsoft.Performance#CA1823;-Microsoft.Performance#CA1800;-Microsoft.Performance#CA1805;-Microsoft.Performance#CA1810;-Microsoft.Performance#CA1824;-Microsoft.Performance#CA1822;-Microsoft.Performance#CA1815;-Microsoft.Performance#CA1814;-Microsoft.Performance#CA1819;-Microsoft.Performance#CA1821;-Microsoft.Performance#CA1804;-Microsoft.Performance#CA1820;-Microsoft.Performance#CA1802;+!Microsoft.Portability#CA1903;-Microsoft.Portability#CA1901;-Microsoft.Portability#CA1900;-Microsoft.Reliability#CA2001;-Microsoft.Reliability#CA2002;-Microsoft.Reliability#CA2003;-Microsoft.Reliability#CA2004;-Microsoft.Reliability#CA2006;-Microsoft.Security#CA2116;-Microsoft.Security#CA2117;-Microsoft.Security#CA2105;-Microsoft.Security#CA2115;-Microsoft.Security#CA2102;-Microsoft.Security#CA2104;-Microsoft.Security#CA2122;-Microsoft.Security#CA2114;-Microsoft.Security#CA2123;-Microsoft.Security#CA2111;-Microsoft.Security#CA2108;-Microsoft.Security#CA2107;-Microsoft.Security#CA2103;-Microsoft.Security#CA2118;-Microsoft.Security#CA2109;-Microsoft.Security#CA2119;-Microsoft.Security#CA2106;-Microsoft.Security#CA2112;-Microsoft.Security#CA2120;-Microsoft.Security#CA2121;-Microsoft.Security#CA2126;-Microsoft.Security#CA2124;-Microsoft.Security#CA2127;-Microsoft.Security#CA2128;-Microsoft.Security#CA2129;-Microsoft.Usage#CA2243;-Microsoft.Usage#CA2236;-Microsoft.Usage#CA1816;-Microsoft.Usage#CA2227;-Microsoft.Usage#CA2213;-Microsoft.Usage#CA2216;-Microsoft.Usage#CA2214;-Microsoft.Usage#CA2222;-Microsoft.Usage#CA1806;-Microsoft.Usage#CA2217;-Microsoft.Usage#CA2212;-Microsoft.Usage#CA2219;-Microsoft.Usage#CA2201;-Microsoft.Usage#CA2228;-Microsoft.Usage#CA2221;-Microsoft.Usage#CA2220;-Microsoft.Usage#CA2240;-Microsoft.Usage#CA2229;-Microsoft.Usage#CA2238;-Microsoft.Usage#CA2207;-Microsoft.Usage#CA2208;-Microsoft.Usage#CA2235;-Microsoft.Usage#CA2237;-Microsoft.Usage#CA2232;-Microsoft.Usage#CA2223;-Microsoft.Usage#CA2211;-Microsoft.Usage#CA2233;-Microsoft.Usage#CA2225;-Microsoft.Usage#CA2226;-Microsoft.Usage#CA2231;-Microsoft.Usage#CA2224;-Microsoft.Usage#CA2218;-Microsoft.Usage#CA2234;-Microsoft.Usage#CA2239;-Microsoft.Usage#CA2200;-Microsoft.Usage#CA1801;-Microsoft.Usage#CA2242;-Microsoft.Usage#CA2205;-Microsoft.Usage#CA2230 + + + Newtonsoft.Json.ruleset pdbonly @@ -64,6 +65,7 @@ prompt 4 bin\Release\DotNet20\Newtonsoft.Json.Net20.xml + AllRules.ruleset @@ -72,7 +74,6 @@ - @@ -95,8 +96,6 @@ - - @@ -222,6 +221,11 @@ + + False + .NET Framework 3.5 SP1 Client Profile + false + False .NET Framework 2.0 %28x86%29 @@ -237,6 +241,11 @@ .NET Framework 3.5 false + + False + .NET Framework 3.5 SP1 + false + \ No newline at end of file diff --git a/Src/Newtonsoft.Json/Newtonsoft.Json.Silverlight.csproj b/Src/Newtonsoft.Json/Newtonsoft.Json.Silverlight.csproj index d8624642..e11fde6c 100644 --- a/Src/Newtonsoft.Json/Newtonsoft.Json.Silverlight.csproj +++ b/Src/Newtonsoft.Json/Newtonsoft.Json.Silverlight.csproj @@ -1,4 +1,8 @@ - + + + + v3.5 + Debug AnyCPU @@ -10,7 +14,7 @@ Properties Newtonsoft.Json Newtonsoft.Json.Silverlight - v3.5 + v3.0 false true false @@ -19,6 +23,25 @@ 3.5 + Silverlight + $(TargetFrameworkVersion) + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + false true @@ -31,6 +54,8 @@ prompt 4 Bin\Debug\Silverlight\Newtonsoft.Json.Silverlight.xml + Newtonsoft.Json.ruleset + true pdbonly @@ -42,6 +67,7 @@ prompt 4 Bin\Release\Silverlight\Newtonsoft.Json.Silverlight.xml + AllRules.ruleset @@ -100,8 +126,6 @@ - - @@ -202,7 +226,24 @@ - + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + +