Project
ReSharper
Priority
Normal
Type
Bug
Fix versions
No Fix versions
State
Open
Assignee
Sergey Shkredov
Subsystem
Refactorings
Affected versions
No Affected versions
Fixed in build
No Fixed in build
  • Created by   oleksa borodie
    5 years ago (05 Aug 2006 21:27)
  • Updated by   Jura Gorohovsky
    10 months ago (08 Jul 2011 16:46)
  • Jira: RSRP-15211
    (history, comments)
 
RSRP-15211 Extract interface moves class property attributes to the interface
2
Issue is visible to: All Users
  The issue is visible to the selected user group only
Hello.

"Extract interface" moves property attributes from class to interface when performed.
before:
    public class Language : CWObject
    {
        #region "Private fields"

        private string _name;
        private bool _isSystem;
		private string _cultureReference;

        #endregion

        #region "Constructors"

        public Language(int id, string name, bool isSystem, string cultureReference)
        {
            this._id = id;
            this._name = name;
            this._isSystem = isSystem;
			this._cultureReference = cultureReference;
        }

        public Language()
        {
        }

        #endregion


        [MapField(SourceName = "LanguageId", TargetName = "LanguageID")]
        public string LanguageID
        {
            get
            {
                return (string)this._id;
            }
            set
            {
                this.ID = value;
            }
        }
	}


after Extract interface

	public interface ILanguage
	{
		[MapField(SourceName = "LanguageId", TargetName = "LanguageID")]
		string LanguageID { get; set; }
	}


Happy New Year!
Comments (1)
 
History
 
Linked Issues (?)
 
TeamCity Changes (0)
 
Andrew Clancy
  Andrew Clancy
06 Aug 2009 18:39
2 years ago
Yup, if you're extracting an interface for something it shouldnt bring over the attributes - the visual studio one doesnt apparently. At least give the option

Cheers,
Andy