예제 #1
0
        public RowComplexType(string typeName)
        {
            if (String.IsNullOrEmpty(typeName)) throw new ArgumentNullException("typeName");
            this.typeName = typeName;
            this.Properties = new Dictionary<string, object>();

            if (typeName == CustomRowBasedContext.CustomerFullName || typeName == CustomRowBasedContext.CustomerWithBirthdayFullName)
            {
                if (!OpenWebDataServiceHelper.EnableFriendlyFeeds || typeName == CustomRowBasedContext.CustomerFullName)
                {
                    RowComplexType address = new RowComplexType(CustomRowBasedContext.AddressFullName);
                    address.Properties["StreetAddress"] = "Line1";
                    address.Properties["City"] = "Redmond";
                    address.Properties["State"] = "WA";
                    address.Properties["PostalCode"] = "98052";
                    this.Properties.Add("Address", address);
                }
            }
        }
예제 #2
0
 public RowComplexType AddressServiceOperation()
 {
     RowComplexType address = new RowComplexType(CustomRowBasedContext.AddressFullName);
     address.Properties["StreetAddress"] = "NE 228th";
     address.Properties["City"] = "Sammamish";
     address.Properties["State"] = "WA";
     address.Properties["PostalCode"] = "98074";
     return address;
 }