Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Port the majority of the System.ComponentModel APIs into the open#12081

Merged
AlexGhiondea merged 2 commits intodotnet:masterfrom
AlexGhiondea:PortSysCompMod
Sep 30, 2016
Merged

Port the majority of the System.ComponentModel APIs into the open#12081
AlexGhiondea merged 2 commits intodotnet:masterfrom
AlexGhiondea:PortSysCompMod

Conversation

@AlexGhiondea
Copy link
Copy Markdown
Contributor

This is the initial PR for this work.

What does this change contain:

  • The reference source for the updated APIs. We have decided to put the new APIs in the System.ComponentModel.TypeConverter type for now. Further refactoring will move them around if necessary.
  • The source code corresponding to the introduced APIs.
  • I have removed the stubs introduced by the System.Threading.Timers works as those APIs are now fully exposed and implemented.

There are a couple of things missing:

  • There are APIs that the implementation uses that have not yet been exposed. For those I have created stubs in order to have the code compile. I will work on either filling those APIs or filing issues to track the addition of the API.
  • There are no tests yet as part of this change. Once all the tracking issues have been filed I will start on getting the tests open sourced

/cc @weshaggard @danmosemsft

"netstandard1.7": {
"imports": [
"dotnet5.1"
"dotnet5.4"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"dotnet5.4 [](start = 7, length = 11)

I believe you can remove "imports" sections

// <copyright file="Component.cs" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you should replace all comments of this sort with

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rand the codeformatter on the TypeConverter project, but I missed the files I added to the Primitives folder.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh -- the code formatter did not remove the existing copyright headers....

//------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all these need to go...

{
using System;

/// <devdoc>
Copy link
Copy Markdown
Member

@danmoseley danmoseley Sep 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably search and replace devdoc for summary and remove para ?

/// Specifies a set of technologies designer hosts should support.
/// </para>
/// </devdoc>
[System.Runtime.InteropServices.ComVisible(true)]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check with Wes, but I think we are stripping all ComVisible attributes.

protected virtual object GetService(System.Type service) { throw null; }
public override string ToString() { throw null; }
}
// public partial class Component : System.IDisposable
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// [](start = 4, length = 2)

?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been pushed down into the Primitives.

* An object that can rollback edits.
*
* Copyright (c) 1999 Microsoft Corporation
*/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more to remove :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@danmoseley
Copy link
Copy Markdown
Member

Are you planning to include tests in this commit, or a subsequent one? I have a preference for the same commit unless there is a good reason (eg unblock others).

@AlexGhiondea
Copy link
Copy Markdown
Contributor Author

I am planning to have them as part of the same PR, but probably in a separate commit to keep things nicer.





Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Leading whitespace. Applies to many files in this PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a by-product of removing the old style copyright headers. I will see if the CodeFormatter tool can fix this. If it cannot, I am going to leave it as-is.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👎 we should fix them even if the codeformatter doesn't.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed these.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@justinvp sorry if my previous comment came off wrong -- really appreciate your code reviews! :)

/// Initializes a new instance of the <see cref='System.ComponentModel.AddingNewEventArgs'/> class,
/// with no new object defined.
/// </summary>
public AddingNewEventArgs() : base()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: the : base() is unnecessary here and in the ctor below.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. This and the other commend you added below are good candidates for cleaning up after this large chunk of code is ported into the open.

/// one itself.
/// </summary>
[HostProtection(SharedState = true)]
public class AddingNewEventArgs : EventArgs
Copy link
Copy Markdown
Contributor

@justinvp justinvp Sep 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: This class could be simplified...

public class AddingNewEventArgs : EventArgs
{
    public AddingNewEventArgs()
    {
    }

    public AddingNewEventArgs(object newObject)
    {
        NewObject = newObject;
    }

    public object NewObject { get; set; }
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am going to capture these and the related comments about improving the code into a separate issue that we can tackle after the code has been ported into the open.



/*
*/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: In addition to the leading whitespace, some files have these empty comments.

return _bindable.GetHashCode();
}

#if !SILVERLIGHT
Copy link
Copy Markdown
Contributor

@justinvp justinvp Sep 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the SILVERLIGHT ifdef be removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

using System.Security.Permissions;
using CodeAccessPermission = System.Security.CodeAccessPermission;

/// <include file='doc\BindingList.uex' path='docs/doc[@for="BindingList"]/*' />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the <includes> be removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup. Removed!

private bool _raiseListChangedEvents = true;
private bool _raiseItemChangedEvents = false;

[NonSerialized()]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Could be [NonSerialized] (parens aren't needed).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will leave as-is for now. We can clean up all the code (including the other suggestions) once the port is complete!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was in a single file. Simple enough to change now.

}
}

private static class CultureInfoMapper
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be improved...

Benefits:

  • Avoids intermediate allocations as items are added to the dictionary by specifying the capacity
  • Avoids looking up the key twice by using TryGetValue
  • Avoids manual lazy initialization
  • Allows s_cultureInfoNameMap to be readonly
private static class CultureInfoMapper
{
    // Dictionary of CultureInfo.DisplayName, CultureInfo.Name for cultures that have changed DisplayName over releases.
    // This is to workaround an issue with CultureInfoConverter that serializes DisplayName (fixing it would introduce breaking changes).
    private static readonly Dictionary<string, string> s_cultureInfoNameMap = CreateMap();

    private static Dictionary<string, string> CreateMap()
    {
        const int Count = 274;
        var result = new Dictionary<string, string>(Count)
        {
            { "Afrikaans", "af" },
            ...
        };
        Debug.Assert(result.Count == Count);
        return result;
    }

    public static string GetCultureInfoName(string cultureInfoDisplayName)
    {
        string name;
        return s_cultureInfoNameMap.TryGetValue(cultureInfoDisplayName, out name) ?
            name :
            cultureInfoDisplayName;
    }
}

@AlexGhiondea
Copy link
Copy Markdown
Contributor Author

@justinvp Thanks for taking a look at this PR!

Copy link
Copy Markdown
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I skimmed through and left a bunch of comments. Many are nits and can be addressed as a cleanup if you like. Some are a bit more concerning, e.g .why BackgroundWorker is in here. Overall, good job.

{
return true;
}
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: you could make members like this more concise if you wanted to with expression-bodied members, e.g.

protected virtual bool CanRaiseEvents => true;

public class Component : /*TODO NETSTANDARD2.0 MarshalByRefObject, */IComponent
{
/// <summary>
/// <para>Static hask key for the Disposed event. This field is read-only.</para>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: hask => hash

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the <para> tags be removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They could -- it looks like we were not consistent across this repo ... so we have other places with these tags.

I will capture these in a code-clean-up issue.

{
get { return _site; }
set { _site = value; }
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: could just be:

public virtual ISite Site { get; set; }

I'll only comment on each such pattern once; I'm sure there are other such cases later on.

if (_events != null)
{
EventHandler handler = (EventHandler)_events[s_eventDisposed];
if (handler != null) handler(this, EventArgs.Empty);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: With C# 6, this pattern can now be simplified to just:

((EventHandler)_events[s_eventDisposed])?.Invoke(this, EventArgs.Empty);

{
ISite s = _site;
return s == null ? null : s.Container;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Could be simplified with ?.

public IContainer Container => _site?.Container;

{
string[] segments = licenseFile.Segments;
string licFileName = segments[segments.Length - 1];
string key = licFileName.Substring(0, licFileName.LastIndexOf("."));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if there's no period in licFileName?

try
{
WebClient webClient = new WebClient();
webClient.Credentials = CredentialCache.DefaultCredentials;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should test this and make sure it behaves as expected (e.g. the credentials are a nop) on Unix.

[System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name = "FullTrust")]
public sealed class ContextStack
{
private ArrayList _contextStack;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same general question as earlier about replacing the non-generic collections with generic ones wherever possible.

@@ -0,0 +1,70 @@
D:\code\gitHub\alexghiondea\corefx\src\System.ComponentModel.TypeConverter\src\System\ComponentModel\ArrayConverter.cs
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this file that has your username in it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accidentally checked that in. Removed.

{
internal const string SystemDrawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal const string SystemDesign = "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
} No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these used for? These assemblies don't exist in core.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed them from here. they are used inside DesignerAttribute and EditorAttributes. I moved the string literals directly there. We might want to remove them completely.

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We no longer need depprojs'.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

"dotnet5.8"
]
},
"netstandard1.0":
Copy link
Copy Markdown
Member

@weshaggard weshaggard Sep 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

netstandard1.0 section is no longer needed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Copy Markdown
Member

@weshaggard weshaggard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still lots of clean-up to do here.

"System.Resources.ResourceManager": "4.0.0"
},
"imports": [
"dotnet5.1"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imports can be removed.

<Project Include="System.ComponentModel.Primitives.csproj">
<TargetGroup>net45</TargetGroup>
</Project>
<Project Include="System.ComponentModel.Primitives.csproj">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YOu can remove all the builds from here except for the default and the net463 build.

<AssemblyName>System.ComponentModel.Primitives</AssemblyName>
<IsPartialFacadeAssembly Condition="'$(TargetGroup)'=='net45'">true</IsPartialFacadeAssembly>
<NuGetTargetMoniker Condition="'$(TargetGroup)' == ''">.NETStandard,Version=v1.0</NuGetTargetMoniker>
<AssemblyVersion Condition="'$(TargetGroup)'=='net45' or '$(TargetGroup)'=='netstandard1.0'">4.1.1.0</AssemblyVersion>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

net45 can be removed from this project.


#if !netstandard17
private ComponentCollection() { }
#else
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we even need the #ifdefs? I would just eliminate the netstandard1.0 builds.

/// Creates a new event handler list. The parent component is used to check the component's
/// CanRaiseEvents property.
/// </summary>
[SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like no because it is related to security demands which we don't have.

"dotnet5.8"
]
},
"netstandard1.0": {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove net45 and netstandard1.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please do remove these dead configurations from here otherwise we do more package restoring for no reason.

public override System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributes) { throw null; }
public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) { throw null; }
}
public partial class Component : System.IDisposable
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to leave a type-forward behind.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add it as a manual type-forward to S.CM.P





Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👎 we should fix them even if the codeformatter doesn't.

<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<ItemGroup>
<ProjectReference Include="..\ref\4.1.0\System.ComponentModel.Primitives.depproj">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please have a read over my document that talks about how to version these libraries and make the necessary updates and/or leave comments on my PR (#12036) about followup questions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do.

@AlexGhiondea AlexGhiondea force-pushed the PortSysCompMod branch 2 times, most recently from ac8e806 to e2ffe37 Compare September 29, 2016 17:25
@weshaggard
Copy link
Copy Markdown
Member

@dotnet-bot test this please

}
public partial class ComponentCollection
[System.ComponentModel.DesignerCategoryAttribute("Component")]
public partial class Component : /*TODO NETSTANDARD2.0 System.MarshalByRefObject,*/ System.ComponentModel.IComponent, System.IDisposable
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure we have an issue tracking these MarshalByRefObject TODOs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few follow-ups and they are all captured in issue #12212

"netstandard1.7": {
"dependencies":
{
"System.Runtime": "4.3.0-beta-24522-03",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really hope System.ComponentModel.Primitives doesn't actually depend on all these packages. Certainly the ref doesn't. Please trim this to the exact set of references that show up in the assembly reference table of the built binary.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

<ItemGroup Condition="'$(TargetGroup)'==''">
<Compile Include="System\ComponentModel\Component.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)'=='net45' or '$(TargetGroup)'=='net463'">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

net45 condition isn't needed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

namespace System.ComponentModel
{
public class ComponentCollection
using System.Collections;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using statements should be outside of namespaces.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

"System.Diagnostics.Tools": "4.3.0-beta-24522-03",
"System.Resources.ResourceManager": "4.3.0-beta-24522-03",
"System.Runtime": "4.3.0-beta-24522-03",
"System.Threading": "4.0.0"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bump System.Threading package version up to the latest 4.3.0-beta-* version as well, otherwise you will be seeing downgrade warnings.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

"System.Threading": "4.0.0"
},
"imports": [
"dotnet5.8"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imports should be deleted.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most projects have just been putting these in the main .cs file instead of a separate .Forwards file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved into the main file.

public override bool Equals(object obj) { throw null; }
public override int GetHashCode() { throw null; }
}
// [System.ComponentModel.DefaultEventAttribute("DoWork")]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove these instead of commenting them out.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought I got all of them but missed this one. Gone now.

public System.ComponentModel.InheritanceLevel InheritanceLevel { get { throw null; } }
public override bool Equals(object value) { throw null; }
public override int GetHashCode() { throw null; }
//TODO NETSTANDARD2.0 - expose IsDefaultAttribute on Attribute public override bool IsDefaultAttribute() { throw null; }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure we have a follow-up item for this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#12212

{
"dependencies": {
"System.Collections.NonGeneric": "4.3.0-beta-24522-03",
"System.Collections.Specialized": "4.3.0-beta-24522-03",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please trim this to the exact set that is needed. I really hope we don't need things like System.Security.Permissions for example.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

<value>The object used to marshal the event handler calls issued when an interval has elapsed.</value>
</data>

<!-- To be moved -->
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be moved where?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uhm.. here? Removed the comment

using System.ComponentModel;
using System.Reflection;

namespace System
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure we have a follow-up item for removing all these stubs.


namespace System.Resources
{
public partial interface IResourceReader : System.Collections.IEnumerable, System.IDisposable
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexperovich be aware this is going to cause conflicts with your resource work.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this need to be here? Can it not just reference System.Resources.Reader?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that is available, it should absolutely reference that!

"System.IO": "4.3.0-beta-24522-03",
"System.IO.FileSystem": "4.3.0-beta-24522-03",
"System.Linq": "4.3.0-beta-24522-03",
"System.Net.WebClient": "4.3.0-beta-24522-03",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should file a follow-up item about breaking this dependency on WebClient, especially if it is tied to the license stuff which we aren't likely to fully support anyway.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All right.

Copy link
Copy Markdown
Member

@weshaggard weshaggard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a bunch of clean-up and follow-up comments but I don't see anything that is actually broken. Please be sure to follow-up on the clean-up.

This change allows types higher in the stack to use the type.
The build is also adjusted to allow for building and testing against netstandard1.7
@AlexGhiondea AlexGhiondea merged commit f94dd87 into dotnet:master Sep 30, 2016
@karelz karelz modified the milestone: 1.2.0 Dec 3, 2016
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Port the majority of the System.ComponentModel APIs into the open

Commit migrated from dotnet/corefx@f94dd87
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants