﻿// register namespace
Type.registerNamespace("AjaxTutorial");

// create PersonPropertyChangedEventArgs class and constructor
AjaxTutorial.PersonPropertyChangedEventArgs = function(
  propertyName, oldValue, newValue)
{
  // initialize the base class
  AjaxTutorial.PersonPropertyChangedEventArgs.initializeBase(
    this, [propertyName]);
  
  // initialize oldValue and newValue property values
  this._oldValue = oldValue;
  this._newValue = newValue;
}

// create the members of PersonPropertyChangedEventArgs
AjaxTutorial.PersonPropertyChangedEventArgs.prototype = 
{
  // get accessor for oldValue property
  get_oldValue: function(){
    return this._oldValue;
  },
  
  // get accessor for newValue property
  get_newValue: function(){
    return this._newValue;
  } 
}

// register the class mentioning the base class
AjaxTutorial.PersonPropertyChangedEventArgs.registerClass(
  'AjaxTutorial.PersonPropertyChangedEventArgs', 
  Sys.PropertyChangedEventArgs);