Skip to content

Commit

Permalink
-refactoring methods names
Browse files Browse the repository at this point in the history
  • Loading branch information
danardelean committed Sep 26, 2015
1 parent f667e2c commit 867d03f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Beacons.Helper/Beacons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public iBeaconData()
}
public static class iBeaconExtensions
{
public static void SetiBeaconAdvertisement(this BluetoothLEAdvertisement Advertisment, iBeaconData data)
public static void iBeaconSetAdvertisement(this BluetoothLEAdvertisement Advertisment, iBeaconData data)
{
BluetoothLEManufacturerData manufacturerData = new BluetoothLEManufacturerData();

Expand Down Expand Up @@ -65,7 +65,7 @@ public static void SetiBeaconAdvertisement(this BluetoothLEAdvertisement Adverti
Advertisment.ManufacturerData.Add(manufacturerData);
}

public static iBeaconData ParseiBeaconAdvertisement(this BluetoothLEAdvertisement Advertisment,short RawSignalStrengthInDBm)
public static iBeaconData iBeaconParseAdvertisement(this BluetoothLEAdvertisement Advertisment,short RawSignalStrengthInDBm)
{
iBeaconData beacon = null;
foreach(var adv in Advertisment.ManufacturerData)
Expand Down
2 changes: 1 addition & 1 deletion Beacons.Tasks/AdvertismentBackgroundTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void Run(IBackgroundTaskInstance taskInstance)
List<iBeaconData> beacons = new List<iBeaconData>();
foreach (var adv in advertisements)
{
var beacon = adv.Advertisement.ParseiBeaconAdvertisement(adv.RawSignalStrengthInDBm);
var beacon = adv.Advertisement.iBeaconParseAdvertisement(adv.RawSignalStrengthInDBm);
if (beacon != null)
beacons.Add(beacon);
}
Expand Down
2 changes: 1 addition & 1 deletion Beacons.Universal.Background/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ private void Button_Click(object sender, RoutedEventArgs e)
// Create and initialize a new trigger to configure it.
trigger = new BluetoothLEAdvertisementWatcherTrigger();
// Add the manufacturer data to the advertisement filter on the trigger:
trigger.AdvertisementFilter.Advertisement.SetiBeaconAdvertisement(new iBeaconData());
trigger.AdvertisementFilter.Advertisement.iBeaconSetAdvertisement(new iBeaconData());
// By default, the sampling interval is set to be disabled, or the maximum sampling interval supported.
// The sampling interval set to MaxSamplingInterval indicates that the event will only trigger once after it comes into range.
// Here, set the sampling period to 1 second, which is the minimum supported for background.
Expand Down
4 changes: 2 additions & 2 deletions Beacons.Universal.Foreground/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public MainPage()
watcher = new BluetoothLEAdvertisementWatcher();

// Monitor all iBeacons advertisment
watcher.AdvertisementFilter.Advertisement.SetiBeaconAdvertisement(new iBeaconData());
watcher.AdvertisementFilter.Advertisement.iBeaconSetAdvertisement(new iBeaconData());

//// Monitor all iBeacons with UUID
//watcher.AdvertisementFilter.Advertisement.SetiBeaconAdvertismentManufacturerData(
Expand Down Expand Up @@ -168,7 +168,7 @@ private async void OnAdvertisementReceived(BluetoothLEAdvertisementWatcher watch
string localName = eventArgs.Advertisement.LocalName;

// Get iBeacon specific data
var beaconData = eventArgs.Advertisement.ParseiBeaconAdvertisement(eventArgs.RawSignalStrengthInDBm);
var beaconData = eventArgs.Advertisement.iBeaconParseAdvertisement(eventArgs.RawSignalStrengthInDBm);


if (beaconData == null)
Expand Down

0 comments on commit 867d03f

Please sign in to comment.